Skip to content

Commit 31871fb

Browse files
feat: run cross version tests on release PR
1 parent b1967a2 commit 31871fb

File tree

3 files changed

+21
-5
lines changed

3 files changed

+21
-5
lines changed

.github/workflows/pr-test.yml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ jobs:
1313
steps:
1414
- uses: actions/checkout@v4
1515

16-
- name: Use Node.js 18
16+
- name: Setup Node.js
1717
uses: actions/setup-node@v4
1818
with:
19-
node-version: '18'
19+
node-version: '20'
2020
cache: 'npm'
2121

2222
- name: Install dependencies
@@ -38,6 +38,20 @@ jobs:
3838
etherscan-api-key: ${{ secrets.ETHERSCAN_API_KEY }}
3939
alchemy-api-key: ${{ secrets.ALCHEMY_API_KEY }}
4040

41+
test-node-versions:
42+
uses: ./.github/workflows/reusable-test.yml
43+
# for release PR run tests on all supported node versions
44+
if: ${{ contains('release-please--', github.ref_name ) }}
45+
strategy:
46+
matrix:
47+
node-version: ['20', '22', '24']
48+
with:
49+
node-version:
50+
secrets:
51+
infura-project-id: ${{ secrets.INFURA_PROJECT_ID }}
52+
etherscan-api-key: ${{ secrets.ETHERSCAN_API_KEY }}
53+
alchemy-api-key: ${{ secrets.ALCHEMY_API_KEY }}
54+
4155
sonar:
4256
runs-on: ubuntu-latest
4357
needs: test
@@ -47,7 +61,7 @@ jobs:
4761
- name: Setup Node.js
4862
uses: actions/setup-node@v4
4963
with:
50-
node-version: '18'
64+
node-version: '20'
5165
cache: 'npm'
5266

5367
- name: Install dependencies

.github/workflows/reusable-compute-staging-version.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ jobs:
1818
uses: actions/checkout@v4
1919
- name: Set up Node.js
2020
uses: actions/setup-node@v4
21+
with:
22+
node-version: '20'
2123
- name: Set publish version
2224
id: set-publish-version
2325
run: |

.github/workflows/reusable-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
inputs:
77
node-version:
88
description: 'Node version to use as specified in actions/setup-node@v4'
9-
default: '18'
9+
default: '20'
1010
type: string
1111
upload-coverage:
1212
description: 'Upload coverage data for later reuse'
@@ -39,7 +39,7 @@ jobs:
3939
cache: 'npm'
4040

4141
- name: Install dependencies
42-
run: npm ci
42+
run: npm ci && npm run
4343

4444
- name: Build
4545
run: npm run build

0 commit comments

Comments
 (0)