Skip to content

Commit

Permalink
Add type tests to GitHub Actions config
Browse files Browse the repository at this point in the history
- This tests against the same minimum version as the existing type
  definitions on DefinitelyTyped, so users can upgrade to at least the
  version supported there, and then switch over to using this. Note
  that type tests do *not* use Ember Try, and therefore do not drift
  the lockfile. This is intentional: the emitted types here are wholly
  unaffected by the rest of the dependencies other than those in
  `@types`, and for compatibility with TS we only care about the types.
  This makes that part of CI run *much* faster.

- The type tests allow failures against the `typescript@next` version,
  just as the runtime tests do for Ember Canary releases.
  • Loading branch information
chriskrycho committed May 6, 2022
1 parent 48cb35a commit f993b9e
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,26 @@ jobs:
run: yarn install --frozen-lockfile
- name: Run Tests
run: node_modules/.bin/ember try:one ${{ matrix.scenario }} --skip-cleanup

types:
name: type tests

runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
ts-version:
- 4.4
- 4.5
- 4.6
- next

steps:
- uses: actions/checkout@v3
- run: yarn install --frozen-lockfile --non-interactive
- run: yarn add -D typescript@${{ matrix.ts-version }}
- run: ./node_modules/.bin/tsc --project type-tests
- run: ./node_modules/.bin/tsc --project type-tests/with-registry

continue-on-error: ${{ matrix.ts-version == 'next' }}

0 comments on commit f993b9e

Please sign in to comment.