Skip to content

fix: Integration tests failing in CI due to missing JWT secret #5

fix: Integration tests failing in CI due to missing JWT secret

fix: Integration tests failing in CI due to missing JWT secret #5

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build-and-test-backend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore --configuration Release
- name: Check formatting
run: dotnet format --verify-no-changes --verbosity diagnostic
- name: Test with coverage
run: dotnet test --no-build --configuration Release --verbosity normal --collect:"XPlat Code Coverage" --results-directory ./coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
files: ./coverage/**/coverage.cobertura.xml
flags: backend
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}
build-and-test-frontend:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./DocumentGenerator.Client
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: ./DocumentGenerator.Client/package-lock.json
- name: Install dependencies
run: npm ci
- name: Lint
run: npm run lint
- name: Test with coverage
run: npm test -- --run --coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
files: ./DocumentGenerator.Client/coverage/coverage-final.json
flags: frontend
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}
- name: Build
run: npm run build