test(compare): add E2E tests for git baseline comparison #402
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| test: | |
| name: Test | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| node-version: [20.x, 22.x] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: 'npm' | |
| cache-dependency-path: 'package-lock.json' | |
| - name: Install dependencies | |
| shell: bash | |
| run: | | |
| set -e | |
| npm ci | |
| # Verify Rollup native module works (npm ci silently skips optional deps) | |
| node -e "require('rollup')" 2>/dev/null || ( | |
| echo "Rollup native module missing. Regenerating lockfile..." | |
| rm -rf node_modules package-lock.json | |
| npm install | |
| ) | |
| - name: Build project | |
| run: npm run build | |
| - name: Run tests | |
| if: ${{ !(matrix.os == 'ubuntu-latest' && matrix.node-version == '20.x') }} | |
| run: npm test | |
| - name: Run tests with coverage | |
| if: ${{ matrix.os == 'ubuntu-latest' && matrix.node-version == '20.x' }} | |
| run: npm run test:coverage | |
| lint-check: | |
| name: Lint Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20.x' | |
| cache: 'npm' | |
| cache-dependency-path: 'package-lock.json' | |
| - name: Install dependencies | |
| shell: bash | |
| run: | | |
| set -e | |
| npm ci | |
| # Verify Rollup native module works (npm ci silently skips optional deps) | |
| node -e "require('rollup')" 2>/dev/null || ( | |
| echo "Rollup native module missing. Regenerating lockfile..." | |
| rm -rf node_modules package-lock.json | |
| npm install | |
| ) | |
| - name: Build project | |
| run: npm run build | |
| - name: Check TypeScript | |
| run: npx tsc --noEmit |