Update Node.js to v22 #196
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
name: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
smoke: | |
name: Smoke test | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: | |
- 22 | |
- 20 | |
- 18 | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- uses: ./.github/actions/setup | |
with: | |
node-version: ${{ matrix.node-version }} | |
- run: pnpm build | |
- run: node ./dist/main.js fetch | |
- run: node ./dist/main.js tsc --version | |
eslint: | |
name: ESLint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- uses: ./.github/actions/setup | |
- run: pnpm eslint . | |
dprint: | |
name: dprint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- uses: ./.github/actions/setup | |
- run: pnpm dprint check | |
required: | |
runs-on: ubuntu-latest | |
if: ${{ always() }} | |
needs: | |
- smoke | |
- eslint | |
- dprint | |
steps: | |
- name: Check required jobs | |
run: | | |
results=( | |
"${{ needs.smoke.result }}" | |
"${{ needs.eslint.result }}" | |
"${{ needs.dprint.result }}" | |
) | |
for result in "${results[@]}"; do | |
if [[ "$result" != "success" ]]; then | |
echo "One or more jobs failed" | |
exit 1 | |
fi | |
done |