Add GitHub sponsorship button to repository #6
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: CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| node: [ "18", "20", "22", "24" ] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| cache: npm | |
| - run: npm ci | |
| - name: Build | |
| run: npm run build | |
| - name: Typecheck | |
| run: npm run typecheck | |
| - name: Test | |
| run: npm test | |
| lint: | |
| name: Static analysis (ESLint) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| cache: npm | |
| - run: npm ci | |
| - name: ESLint | |
| run: npm run lint | |
| coverage: | |
| name: Coverage gate (>=90% lines) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| cache: npm | |
| - run: npm ci | |
| # Build first: the nestjs tests import the built @babelqueue/bullmq workspace | |
| # package (now linked locally via the ^1.0.0 dependency), so its dist/ must exist. | |
| - name: Build | |
| run: npm run build | |
| - name: Coverage | |
| run: npm run coverage | |
| ci-green: | |
| name: CI green | |
| runs-on: ubuntu-latest | |
| needs: [test, lint, coverage] | |
| if: ${{ always() }} | |
| steps: | |
| - name: Fail if any required job did not pass | |
| run: | | |
| if ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}; then | |
| echo "A required job failed or was cancelled." | |
| exit 1 | |
| fi |