feat: split GitHub Actions workflows into separate files for tests, t… #1
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: Type Check | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| typecheck: | |
| name: TypeScript Check | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [20.x] | |
| steps: | |
| - 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 type checking | |
| id: typecheck | |
| run: npm run typecheck | |
| continue-on-error: true | |
| - name: Create Status Comment | |
| if: github.event_name == 'pull_request' && steps.typecheck.outcome == 'failure' | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const message = `## Type Check Results\n\n❌ TypeScript type checking failed. Please fix type errors in your code.`; | |
| github.rest.issues.createComment({ | |
| issue_number: context.issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| body: message | |
| }); | |
| - name: Check for failures | |
| if: steps.typecheck.outcome == 'failure' | |
| run: exit 1 |