Bump actions/checkout from 4 to 6 #14
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] | |
| paths: | |
| - 'src/**' | |
| - 'test/**' | |
| - 'bin/**' | |
| - 'package.json' | |
| - 'package-lock.json' | |
| - 'tsconfig.json' | |
| - 'tsconfig.server.json' | |
| - 'vite.config.ts' | |
| - 'eslint.config.js' | |
| - '.prettierrc.json' | |
| - '.prettierignore' | |
| - '.github/workflows/ci.yml' | |
| - '.github/actions/setup/action.yml' | |
| pull_request: | |
| paths: | |
| - 'src/**' | |
| - 'test/**' | |
| - 'bin/**' | |
| - 'package.json' | |
| - 'package-lock.json' | |
| - 'tsconfig.json' | |
| - 'tsconfig.server.json' | |
| - 'vite.config.ts' | |
| - 'eslint.config.js' | |
| - '.prettierrc.json' | |
| - '.prettierignore' | |
| - '.github/workflows/ci.yml' | |
| - '.github/actions/setup/action.yml' | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ci-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| lint: | |
| name: Lint and format | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| if: github.event_name != 'pull_request' || github.event.pull_request.draft == false | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ./.github/actions/setup | |
| with: | |
| # ESLint v10 requires ^20.19.0 || ^22.13.0 || >=24, so pick a Node | |
| # that satisfies it (the typecheck/build/test matrix stays on the | |
| # project's engines floor 20.19/22.12 to test the actual runtime). | |
| node-version: '22.13.x' | |
| - run: npm run lint | |
| - run: npm run format:check | |
| typecheck: | |
| name: Typecheck (Node ${{ matrix.node-version }}) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| if: github.event_name != 'pull_request' || github.event.pull_request.draft == false | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| node-version: ['20.19.x', '22.12.x'] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ./.github/actions/setup | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - run: npm run typecheck | |
| build: | |
| name: Build (Node ${{ matrix.node-version }}) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| if: github.event_name != 'pull_request' || github.event.pull_request.draft == false | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| node-version: ['20.19.x', '22.12.x'] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ./.github/actions/setup | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - run: npm run build | |
| test: | |
| name: Test (Node ${{ matrix.node-version }}) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| if: github.event_name != 'pull_request' || github.event.pull_request.draft == false | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| node-version: ['20.19.x', '22.12.x'] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ./.github/actions/setup | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - run: npm run test:preflight | |
| - run: npm run test:judge | |
| - run: npm run test:runner | |
| - run: npm run test:sandbox | |
| ci-success: | |
| name: CI Success | |
| runs-on: ubuntu-latest | |
| needs: [lint, typecheck, build, test] | |
| if: always() | |
| steps: | |
| - name: Verify all jobs succeeded | |
| run: | | |
| if [ "${{ needs.lint.result }}" != "success" ] || [ "${{ needs.typecheck.result }}" != "success" ] || [ "${{ needs.build.result }}" != "success" ] || [ "${{ needs.test.result }}" != "success" ]; then | |
| echo "One or more required jobs failed." | |
| exit 1 | |
| fi |