From 820a4059dabbbc6552a4a9cd11f41ea4b268f6c5 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Mon, 20 Nov 2023 15:35:32 +0100 Subject: [PATCH] unit test workflow --- .github/workflows/test.unit.code.yml | 34 ++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/test.unit.code.yml diff --git a/.github/workflows/test.unit.code.yml b/.github/workflows/test.unit.code.yml new file mode 100644 index 0000000..a705148 --- /dev/null +++ b/.github/workflows/test.unit.code.yml @@ -0,0 +1,34 @@ +name: "test:unit test code with defined suites" + +on: push + +jobs: + # only (but most important) job from this workflow required for pull requests + # check results serve as run conditions for all other jobs here + files-changed: + name: Detect File Changes - Frontend + runs-on: ubuntu-latest + outputs: + frontend: ${{ steps.changes.outputs.frontend }} + steps: + - uses: actions/checkout@v3.3.0 + + - name: Check for frontend file changes + uses: dorny/paths-filter@v2.11.1 + id: changes + with: + token: ${{ github.token }} + filters: .github/file-filters.yml + list-files: shell + + unit: + if: needs.files-changed.outputs.frontend == 'true' + name: Unit - Frontend + needs: files-changed + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Frontend | Unit + run: npm install && npm run test:unit \ No newline at end of file