From 073695b7144ea49f30bc54e233112a40fa482c67 Mon Sep 17 00:00:00 2001 From: David Dal Busco Date: Wed, 15 Jan 2025 16:34:35 +0100 Subject: [PATCH] chore: frontend tests on PR Signed-off-by: David Dal Busco --- .github/workflows/frontend-tests.yml | 25 +++++++++++++++++++++++++ package.json | 1 + 2 files changed, 26 insertions(+) create mode 100644 .github/workflows/frontend-tests.yml diff --git a/.github/workflows/frontend-tests.yml b/.github/workflows/frontend-tests.yml new file mode 100644 index 000000000..9ebe32987 --- /dev/null +++ b/.github/workflows/frontend-tests.yml @@ -0,0 +1,25 @@ +name: Frontend Tests + +on: + pull_request: + paths: + - 'src/frontend/**' + +jobs: + tests: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Prepare + uses: ./.github/actions/prepare + - name: Frontend tests + run: npm run test:frontend + + may-merge: + needs: ['tests'] + runs-on: ubuntu-latest + steps: + - name: Cleared for merging + run: echo OK diff --git a/package.json b/package.json index ce8f22f18..a60537346 100644 --- a/package.json +++ b/package.json @@ -40,6 +40,7 @@ "observatory:statuses": "node scripts/observatory.statuses.mjs", "clippy": "cargo clippy --target=wasm32-unknown-unknown -- -A deprecated", "test": "tsc --project tsconfig.spec.json --noEmit && vitest", + "test:frontend": "tsc --project tsconfig.spec.json --noEmit && vitest --dir src/frontend", "build:console": "scripts/cargo.sh console", "build:observatory": "scripts/cargo.sh observatory", "build:satellite": "scripts/cargo.sh satellite",