From 7bc785e8e0c24477eab85234fe8a539b15f10928 Mon Sep 17 00:00:00 2001 From: Nils-Johan Gynther Date: Sun, 3 May 2026 19:55:09 +0200 Subject: [PATCH] ci: add automated test workflow --- .github/workflows/test.yml | 42 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..396b704 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,42 @@ +name: Test Suite + +on: + push: + branches: [ main, develop ] + pull_request: + branches: [ main, develop ] + +jobs: + test: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [24.x] + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + + - name: Install dependencies (backend) + working-directory: ./backend + run: npm install + + - name: Generate Prisma Client + working-directory: ./backend + run: npm run prisma:generate + + - name: Run tests (backend) + working-directory: ./backend + run: npm test + + - name: Build NestJS app + working-directory: ./backend + run: npm run build + continue-on-error: true