Deprecating v17 #9325
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
# This workflow will do a clean installation of node dependencies, build the source code and run tests across different versions of node | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
name: Node.js CI | |
on: | |
push: | |
branches: [ master, v18, v19 ] | |
pull_request: | |
branches: [ master, v18, v19 ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: [18.18.0, 18.x, 20.9.0, 20.x, 22.0.0, 22.x] | |
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | |
steps: | |
- name: Get yarn cache dir | |
id: yarnCache | |
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Node.js ${{ matrix.node-version }} | |
id: setup-node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Cache node modules | |
uses: actions/cache@v4 | |
env: | |
cache-name: cache-yarn | |
with: | |
path: ${{ steps.yarnCache.outputs.dir }} | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-${{ hashFiles('**/yarn.lock') }} | |
- name: Install dependencies | |
run: yarn install | |
- name: Lint | |
run: yarn lint | |
- name: Test | |
run: yarn test | |
- name: Coveralls | |
uses: coverallsapp/github-action@v2 | |
continue-on-error: true | |
with: | |
github-token: ${{ secrets.github_token }} | |
flag-name: run-${{ matrix.node-version }} | |
parallel: true | |
- name: Build | |
run: yarn build | |
- name: CJS test | |
run: yarn test:cjs | |
- name: ESM test | |
run: yarn test:esm | |
- name: Compatibility test | |
run: yarn test:compat | |
- name: Issue 952 # see https://github.com/RobinTail/express-zod-api/issues/952 | |
run: yarn test:952 | |
finish: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Coveralls Finished | |
continue-on-error: true | |
uses: coverallsapp/github-action@v2 | |
with: | |
github-token: ${{ secrets.github_token }} | |
parallel-finished: true |