Skip to content

Commit

Permalink
automated test gh workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-bonez committed Nov 9, 2023
1 parent ab8b250 commit de4877b
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 3 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Debian-based ISO and SquashFS

on:
push:
branches:
- master
- next
pull_request:
branches:
- master
- next

env:
NODEJS_VERSION: "18.15.0"
ENVIRONMENT: dev-unstable

jobs:
test:
name: Run Automated Tests
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- uses: actions/setup-node@v3
with:
node-version: ${{ env.NODEJS_VERSION }}

- name: Run Tests
run: make test
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ EMBASSY_SRC := backend/startd.service $(BUILD_SRC)
COMPAT_SRC := $(shell git ls-files system-images/compat/)
UTILS_SRC := $(shell git ls-files system-images/utils/)
BINFMT_SRC := $(shell git ls-files system-images/binfmt/)
BACKEND_SRC := $(shell git ls-files backend) $(shell git ls-files --recurse-submodules patch-db) $(shell git ls-files libs) frontend/dist/static
BACKEND_SRC := $(shell git ls-files backend) $(shell git ls-files --recurse-submodules patch-db) $(shell git ls-files libs) frontend/dist/static frontend/patchdb-ui-seed.json $(GIT_HASH_FILE)
FRONTEND_SHARED_SRC := $(shell git ls-files frontend/projects/shared) $(shell ls -p frontend/ | grep -v / | sed 's/^/frontend\//g') frontend/node_modules frontend/config.json patch-db/client/dist frontend/patchdb-ui-seed.json
FRONTEND_UI_SRC := $(shell git ls-files frontend/projects/ui)
FRONTEND_SETUP_WIZARD_SRC := $(shell git ls-files frontend/projects/setup-wizard)
Expand Down Expand Up @@ -82,7 +82,7 @@ format:
cd backend && cargo +nightly fmt
cd libs && cargo +nightly fmt

test:
test: $(BACKEND_SRC) $(ENVIRONMENT_FILE)
cd backend && cargo test
cd libs && cargo test

Expand Down Expand Up @@ -181,7 +181,7 @@ snapshots: libs/snapshot_creator/Cargo.toml
cd libs/ && ./build-v8-snapshot.sh
cd libs/ && ./build-arm-v8-snapshot.sh

$(EMBASSY_BINS): $(BACKEND_SRC) $(ENVIRONMENT_FILE) $(GIT_HASH_FILE) frontend/patchdb-ui-seed.json
$(EMBASSY_BINS): $(BACKEND_SRC) $(ENVIRONMENT_FILE)
cd backend && ARCH=$(ARCH) ./build-prod.sh
touch $(EMBASSY_BINS)

Expand Down

0 comments on commit de4877b

Please sign in to comment.