From 42bedefa0db6497c8b6322ada2f43d33bbfa4cb4 Mon Sep 17 00:00:00 2001 From: Merlijn van Ittersum Date: Sun, 22 Dec 2024 11:01:21 +0100 Subject: [PATCH] chore: add github action workflow for building frontend --- .github/workflows/build_frontend.yml | 33 ++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/build_frontend.yml diff --git a/.github/workflows/build_frontend.yml b/.github/workflows/build_frontend.yml new file mode 100644 index 00000000..3e2f1610 --- /dev/null +++ b/.github/workflows/build_frontend.yml @@ -0,0 +1,33 @@ +# 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: Node.js CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [18.x] + + 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 + working-directory: web-client + - run: npm run build --if-present + working-directory: web-client + - run: npm test + working-directory: web-client