Repository navigation
attest: TypeScript 7 support; develop on TypeScript 7.1; release arktype 2.2.8 #995
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: pr | |
| on: | |
| pull_request: | |
| branches: [main] | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| core: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup repo | |
| uses: ./.github/actions/setup | |
| - name: prChecks | |
| run: pnpm prChecks | |
| compatibility: | |
| needs: core | |
| timeout-minutes: 20 | |
| strategy: | |
| matrix: | |
| node: [lts/*] | |
| os: [windows-latest, macos-latest] | |
| include: | |
| - os: ubuntu-latest | |
| node: lts/-1 | |
| - os: ubuntu-latest | |
| node: latest | |
| fail-fast: false | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup repo | |
| uses: ./.github/actions/setup | |
| with: | |
| node: ${{ matrix.node }} | |
| # To test node and OS versions, we don't care about rechecking types | |
| # so just check runtime behavior | |
| - name: Test | |
| run: pnpm testRepo | |
| typescript: | |
| needs: core | |
| timeout-minutes: 10 | |
| strategy: | |
| matrix: | |
| # minimum supported version, then the latest of each major | |
| typescript: [5.1.6, 5.9.3, 6.0.3, 7.0.2] | |
| fail-fast: false | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Setup repo | |
| uses: ./.github/actions/setup | |
| # unlike npx, dlx always runs the requested version even if the workspace has a copy | |
| - name: Typecheck consumer usage with TypeScript ${{ matrix.typescript }} | |
| run: pnpm --package=typescript@${{ matrix.typescript }} dlx -c "tsc --version && tsc --project ark/repo/tsCompat" | |
| ts6: | |
| needs: core | |
| timeout-minutes: 20 | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Setup repo | |
| uses: ./.github/actions/setup | |
| - name: Install TypeScript 6 | |
| run: | | |
| sed -i "s/^ typescript: .*/ typescript: 6.0.3/" pnpm-workspace.yaml | |
| pnpm install --no-frozen-lockfile | |
| - name: Typecheck repo | |
| run: pnpm tsc --version && pnpm typecheckRepo | |
| # attest's declarations must not depend on TS 7's API types, which | |
| # the core job's testTsCompat can't catch since TS 7 is installed there | |
| - name: Typecheck attest's declarations | |
| run: pnpm tsc --project ark/repo/tsCompat/tsconfig.attest.json | |
| # type snapshots and snap population tests' instantiation counts are | |
| # recorded with TS 7, whose type strings and counts differ | |
| - name: Test attest | |
| working-directory: ark/attest | |
| run: pnpm mocha --config ../repo/mocha.package.jsonc --fgrep "populates file" --invert | |
| prChecks: | |
| needs: [compatibility, typescript, ts6] | |
| timeout-minutes: 1 | |
| runs-on: ubuntu-latest | |
| steps: | |
| - run: echo All checks succeeded! ⛵ |