Merge pull request #5 from DanielVolz/feat/add-test-suite

ci: Add test suite and CI pipeline
This commit is contained in:
Daniel Volz
2025-12-30 11:36:09 +01:00
committed by GitHub
2 changed files with 34 additions and 9 deletions
+34 -5
View File
@@ -16,17 +16,46 @@ env:
jobs:
# =============================================================================
# Run Tests First (reuse test workflow)
# Run Tests First
# =============================================================================
test:
name: Run Tests
uses: ./.github/workflows/test.yml
backend-test:
name: Backend Tests
runs-on: ubuntu-latest
defaults:
run:
working-directory: backend
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
cache-dependency-path: backend/package-lock.json
- run: npm ci
- run: npx tsc --noEmit
- run: npm run test:run
frontend-build:
name: Frontend Build
runs-on: ubuntu-latest
defaults:
run:
working-directory: frontend
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
- run: npm ci
- run: npm run build
# =============================================================================
# Build and Push Docker Images (only after tests pass)
# =============================================================================
build-and-push:
needs: test
needs: [backend-test, frontend-build]
runs-on: ubuntu-latest
permissions:
contents: read
-4
View File
@@ -1,12 +1,8 @@
name: Test
on:
push:
branches: [main]
pull_request:
branches: [main]
# Allow this workflow to be called by other workflows
workflow_call:
jobs:
# =============================================================================