From baf7de042355d6d6abe473aa45afbe9c94f59eb2 Mon Sep 17 00:00:00 2001 From: Ryan Wilson-Perkin Date: Thu, 28 Sep 2023 11:51:33 -0400 Subject: [PATCH 1/3] chore: Update Node CI to v16 --- .github/workflows/ci.yml | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2476901..b302e5d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ on: types: [opened, synchronize, reopened] env: - NODE_VERSION: '14.x' + NODE_VERSION: '16.x' jobs: setup: diff --git a/package.json b/package.json index 98a4e78..59086c2 100644 --- a/package.json +++ b/package.json @@ -88,6 +88,6 @@ } }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" } } From fd7b76449adee5410103df979ad21d1f5838b62a Mon Sep 17 00:00:00 2001 From: Ryan Wilson-Perkin Date: Sun, 1 Oct 2023 14:59:48 -0400 Subject: [PATCH 2/3] chore: bump CI testing to Node v18 (LTS) --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b302e5d..b258b30 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ on: types: [opened, synchronize, reopened] env: - NODE_VERSION: '16.x' + NODE_VERSION: '18.x' jobs: setup: From 550a706d4ed1b841f193359feddede4fc83f0091 Mon Sep 17 00:00:00 2001 From: Ryan Wilson-Perkin Date: Sun, 1 Oct 2023 15:10:22 -0400 Subject: [PATCH 3/3] chore: test against 18.x and 20.x in CI --- .github/workflows/ci.yml | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b258b30..78f0121 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,13 +14,14 @@ on: types: [opened, synchronize, reopened] env: - NODE_VERSION: '18.x' + DEFAULT_NODE_VERSION: 18.x jobs: setup: name: Setup strategy: matrix: + node_version: [18.x, 20.x] os: [ ubuntu-latest, windows-latest ] runs-on: ${{ matrix.os }} timeout-minutes: 5 @@ -29,14 +30,14 @@ jobs: - uses: actions/setup-node@v2 with: - node-version: '${{ env.NODE_VERSION }}' + node-version: '${{ matrix.node_version }}' - name: Cache node modules id: cache uses: actions/cache@v2 with: path: node_modules - key: ${{ runner.os }}-node_modules-${{ hashFiles('package-lock.json') }} + key: ${{ runner.os }}-${{matrix.node_version}}-node_modules-${{ hashFiles('package-lock.json') }} - name: Install Dependencies if: steps.cache.outputs.cache-hit != 'true' @@ -45,6 +46,9 @@ jobs: eslint: name: Eslint runs-on: ubuntu-latest + strategy: + matrix: + node_version: [18.x, 20.x] needs: [setup] timeout-minutes: 5 steps: @@ -54,7 +58,7 @@ jobs: - uses: actions/setup-node@v2 with: - node-version: '${{ env.NODE_VERSION }}' + node-version: '${{ matrix.node_version }}' - name: Fetch all branches run: | @@ -64,7 +68,7 @@ jobs: uses: actions/cache@v2 with: path: node_modules - key: ${{ runner.os }}-node_modules-${{ hashFiles('package-lock.json') }} + key: ${{ runner.os }}-${{matrix.node_version}}-node_modules-${{ hashFiles('package-lock.json') }} - name: ESLint run: npm run ci:lint -- $(git diff --diff-filter d --name-only origin/${{ github.base_ref }}...HEAD -- '*.js' '*.ts' '*.tsx') @@ -72,6 +76,9 @@ jobs: typescript: name: Typescript runs-on: ubuntu-latest + strategy: + matrix: + node_version: [18.x, 20.x] needs: [setup] timeout-minutes: 5 steps: @@ -79,13 +86,13 @@ jobs: - uses: actions/setup-node@v2 with: - node-version: '${{ env.NODE_VERSION }}' + node-version: '${{ matrix.node_version }}' - name: Cache node modules uses: actions/cache@v2 with: path: node_modules - key: ${{ runner.os }}-node_modules-${{ hashFiles('package-lock.json') }} + key: ${{ runner.os }}-${{matrix.node_version}}-node_modules-${{ hashFiles('package-lock.json') }} - name: Typescript run: npm run ci:tsc @@ -94,6 +101,7 @@ jobs: name: Test strategy: matrix: + node_version: [18.x, 20.x] os: [ubuntu-latest, windows-latest] runs-on: ${{ matrix.os }} needs: [setup] @@ -103,13 +111,13 @@ jobs: - uses: actions/setup-node@v2 with: - node-version: '${{ env.NODE_VERSION }}' + node-version: '${{ matrix.node_version }}' - name: Cache node modules uses: actions/cache@v2 with: path: node_modules - key: ${{ runner.os }}-node_modules-${{ hashFiles('package-lock.json') }} + key: ${{ runner.os }}-${{matrix.node_version}}-node_modules-${{ hashFiles('package-lock.json') }} - name: Test run: npm run test @@ -127,13 +135,13 @@ jobs: - uses: actions/setup-node@v2 with: - node-version: '${{ env.NODE_VERSION }}' + node-version: '${{ env.DEFAULT_NODE_VERSION }}' - name: Cache node modules uses: actions/cache@v2 with: path: node_modules - key: ${{ runner.os }}-node_modules-${{ hashFiles('package-lock.json') }} + key: ${{ runner.os }}-${{env.DEFAULT_NODE_VERSION}}-node_modules-${{ hashFiles('package-lock.json') }} - name: Build run: npm run build