-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(workflows): add
typescript-canary
Signed-off-by: Lexus Drumgold <[email protected]>
- Loading branch information
1 parent
caf50cf
commit 293fc9a
Showing
1 changed file
with
65 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# TypeScript Canary Check | ||
# | ||
# Run type tests against the latest and next versions of TypeScript. | ||
# | ||
# References: | ||
# | ||
# - https://docs.github.com/actions/learn-github-actions/contexts | ||
# - https://docs.github.com/actions/using-jobs/using-a-matrix-for-your-jobs | ||
# - https://docs.github.com/actions/using-workflows/events-that-trigger-workflows#schedule | ||
# - https://docs.github.com/actions/using-workflows/events-that-trigger-workflows#workflow_dispatch | ||
# - https://github.com/actions/checkout | ||
# - https://github.com/actions/setup-node | ||
# - https://vitest.dev/guide/testing-types.html#run-typechecking | ||
|
||
--- | ||
name: typescript-canary | ||
on: | ||
schedule: | ||
# every monday, 3 hours after typescript@next release | ||
# https://github.com/microsoft/TypeScript/blob/v4.9.4/.github/workflows/nightly.yaml | ||
- cron: '0 10 * * 1' | ||
workflow_dispatch: | ||
permissions: | ||
packages: read | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
HUSKY: 0 | ||
REF: ${{ github.head_ref || github.ref_name }} | ||
jobs: | ||
typescript-canary: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
typescript-version: | ||
- next | ||
- latest | ||
steps: | ||
- id: debug | ||
name: Print environment variables and event payload | ||
uses: hmarr/[email protected] | ||
- id: checkout | ||
name: Checkout ${{ env.REF }} | ||
uses: actions/[email protected] | ||
with: | ||
ref: ${{ env.REF }} | ||
- id: node | ||
name: Setup Node.js | ||
uses: actions/[email protected] | ||
with: | ||
cache: yarn | ||
cache-dependency-path: yarn.lock | ||
node-version-file: .nvmrc | ||
- id: yarn | ||
name: Install dependencies | ||
run: yarn ${{ github.actor == 'dependabot[bot]' && '--no-immutable' || '--immutable' }} | ||
- id: typescript | ||
name: Install typescript@${{ matrix.typescript-version }} | ||
run: yarn add -D typescript@${{ matrix.typescript-version }} | ||
- id: typecheck | ||
name: Run typecheck | ||
run: yarn check:types | ||
- id: typecheck-build | ||
name: Check types:build | ||
run: yarn check:types:build |