From ee2ceb126a10cbe25853496e4f8d01ba59a1f92a Mon Sep 17 00:00:00 2001 From: Alexander Brandon Coles Date: Wed, 22 Jan 2025 17:57:45 -0300 Subject: [PATCH] Add initial GH workflow for frontend test suite [ci skip] --- .github/workflows/test-frontend-unit.yml | 49 ++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/test-frontend-unit.yml diff --git a/.github/workflows/test-frontend-unit.yml b/.github/workflows/test-frontend-unit.yml new file mode 100644 index 000000000000..9165eb479d5e --- /dev/null +++ b/.github/workflows/test-frontend-unit.yml @@ -0,0 +1,49 @@ +name: "Frontend test suite" + +on: + workflow_dispatch: + push: + branches: + - dev + - release/* + paths: + - 'frontend/**/*.{ts,js,json}' + pull_request: + types: [opened, reopened, synchronize] + paths: + - 'frontend/**/*.{ts,js,json}' + +permissions: + contents: read + +defaults: + run: + working-directory: ./frontend + +jobs: + units: + name: Units + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - uses: actions/setup-node@v4 + with: + node-version: '18.13' + cache: npm + cache-dependency-path: frontend/package-lock.json + + - name: Install Dependencies + id: npm-i + run: npm i + + - name: Register plugins + id: npm-run-ci-plugins-register-frontend + run: npm run ci:plugins:register_frontend + + - name: Test (Angular) + id: npm-test + run: npm test -- --code-coverage