Update README.md #705
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Backend coverage | |
| on: | |
| push: | |
| pull_request: | |
| jobs: | |
| coverage-backend: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v2 | |
| with: | |
| node-version: '22' | |
| - name: Install dependencies for backend | |
| working-directory: backend | |
| run: npm ci | |
| - name: Run backend tests with coverage and check threshold | |
| working-directory: backend | |
| run: | | |
| COVERAGE_OUTPUT=$(npm run test:coverage 2>&1) | |
| echo "$COVERAGE_OUTPUT" | |
| if echo "$COVERAGE_OUTPUT" | grep -qE 'coverage threshold for'; then | |
| echo "Error: Global coverage threshold not met"; | |
| exit 1; | |
| else | |
| echo "Global coverage threshold met, proceeding..."; | |
| fi |