chore(ci): update codecov config #40
Workflow file for this run
This file contains 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: Quality Checks | |
on: | |
pull_request: | |
branches: [main, develop] | |
push: | |
branches: [main] | |
jobs: | |
test-and-lint: | |
name: Test and Lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: 'npm' | |
- name: Install dependencies | |
run: npm ci | |
- name: Security audit | |
run: npm audit | |
- name: Run linting | |
run: npm run lint | |
- name: Run unit tests | |
run: npm run test:unit | |
- name: Run integration tests | |
run: npm run test:integration | |
- name: Build application | |
run: npm run build | |
- name: Start test server | |
run: npm run start:test & sleep 5 | |
env: | |
PORT: 3001 | |
NODE_ENV: test | |
- name: Run API tests | |
run: npm run test:api | |
- name: Stop test server | |
if: always() | |
run: npm run stop:test | |
- name: Generate coverage report | |
run: npm run test:coverage | |
- name: Upload coverage reports | |
if: success() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: coverage-report | |
path: coverage/ | |
if-no-files-found: error | |
- name: Upload results to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ./coverage/lcov.info | |
fail_ci_if_error: true | |
verbose: true | |