Update app configuration and enhance functionality #15
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
| # CI workflow for wavespace-senior-project | |
| # Run on every push / pull-request to main branch | |
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [18.x, 20.x] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run tests with coverage (thresholds enforced) | |
| run: npm run test:coverage | |
| - name: Lint (TypeScript) | |
| run: npm run lint | |
| - name: Upload coverage artifacts | |
| if: success() && matrix.node-version == '20.x' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-report-node-${{ matrix.node-version }} | |
| path: | | |
| coverage/coverage-summary.json | |
| coverage/coverage-final.json | |
| coverage/lcov.info | |
| coverage/index.html | |
| if-no-files-found: warn | |
| - name: Upload coverage to Codecov | |
| if: success() && matrix.node-version == '20.x' | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: coverage/coverage-final.json | |
| flags: unittests | |
| fail_ci_if_error: false |