Commonjs compat (#12) #81
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: Build and Test | |
| on: | |
| push: | |
| pull_request: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [20.19.0, 21.x, 22.x, 23.x, 24.x] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup 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: Build project | |
| run: npm run build | |
| - name: Run tests | |
| run: npm test | |
| - name: Publish Test Report | |
| uses: ctrf-io/github-test-reporter@v1 | |
| with: | |
| report-path: "./ctrf/*.json" | |
| summary-delta-report: true | |
| github-report: true | |
| failed-report: true | |
| flaky-report: true | |
| insights-report: true | |
| fail-rate-report: true | |
| flaky-rate-report: true | |
| slowest-report: true | |
| previous-results-report: true | |
| upload-artifact: true | |
| artifact-name: ctrf-test-report-${{ matrix.node-version }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| if: always() | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20.19.0" | |
| cache: "npm" | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Type check | |
| run: npx tsc --noEmit | |
| security: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20.19.0" | |
| cache: "npm" | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run security audit | |
| run: npm audit --audit-level=moderate | |
| - name: Check for known vulnerabilities | |
| run: npx audit-ci --moderate |