TypeScript Latest and Nightly #20
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: TypeScript Latest and Nightly | |
on: | |
schedule: | |
- cron: '0 19 * * *' | |
workflow_dispatch: {} # Also run manually | |
jobs: | |
retreive-versions: | |
runs-on: ubuntu-latest | |
outputs: | |
versions: ${{ steps.set-versions.outputs.versions }} | |
steps: | |
- uses: actions/setup-node@v3 | |
- id: set-versions | |
run: | | |
VERSIONS_JSON=$(npm info typescript versions --json | jq -c '[.[-1], (. | map(select(test("dev|beta|rc") | not)) | .[-1])]') | |
echo "versions=$VERSIONS_JSON" >> $GITHUB_OUTPUT | |
test: | |
runs-on: ubuntu-latest | |
needs: retreive-versions | |
strategy: | |
matrix: | |
node-version: [22.x] | |
typescript-versions: ${{fromJson(needs.retreive-versions.outputs.versions)}} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'yarn' | |
- run: yarn | |
- run: yarn add --dev typescript@${{ matrix.typescript-versions }} | |
- run: yarn run build | |
- run: yarn test | |
env: | |
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | |
- name: Notify failed build | |
uses: jayqi/failed-build-issue-action@v1 | |
if: failure() | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} |