From c67baf216c6c12e166b11a061b11ac99a23f52fd Mon Sep 17 00:00:00 2001 From: Timo De Meyst Date: Sun, 16 Mar 2025 17:15:09 +0100 Subject: [PATCH] actions: Testing workflow aangemaakt Op PRs naar dev die geen draft zijn worden automatisch testen uitgevoerd --- .github/workflows/testing.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/testing.yml diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml new file mode 100644 index 00000000..4913f9fc --- /dev/null +++ b/.github/workflows/testing.yml @@ -0,0 +1,32 @@ +# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs + +name: Testing + +on: + push: + branches: [ "dev" ] + pull_request: + branches: [ "dev" ] + +jobs: + test: + name: Run unit tests + if: '! github.event.pull_request.draft' + runs-on: [self-hosted, Linux, X64] + + strategy: + matrix: + node-version: [22.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: npm ci + - run: npm run build --if-present + - run: npm run test:unit