Skip to content

Commit 43bdd60

Browse files
committed
ci: always install using latest node
1 parent cf30d86 commit 43bdd60

File tree

2 files changed

+20
-6
lines changed

2 files changed

+20
-6
lines changed

.github/workflows/test.yml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,20 @@ jobs:
2323

2424
steps:
2525
- uses: actions/checkout@v2
26-
- name: Use Node.js ${{ matrix.node-version }}
26+
- name: Installing with latest Node.js
2727
uses: actions/setup-node@v2
28+
if: "${{ matrix.node-version != '*' }}"
2829
with:
29-
node-version: ${{ matrix.node-version }}
30+
node-version: '*'
3031
check-latest: true
3132
- name: NPM Install
3233
run: npm ci
34+
- name: Switching to Node.js ${{ matrix.node-version }} to run tests
35+
uses: actions/setup-node@v2
36+
if: "${{ matrix.node-version != '*' }}"
37+
with:
38+
node-version: ${{ matrix.node-version }}
39+
check-latest: true
3340
- name: Linting
3441
run: npm run format:ci
3542
if: "${{ matrix.node-version == '*' }}"
@@ -52,14 +59,21 @@ jobs:
5259

5360
steps:
5461
- uses: actions/checkout@v2
55-
- name: Use Node.js ${{ matrix.node-version }}
62+
- name: Installing with latest Node.js
5663
uses: actions/setup-node@v2
64+
if: "${{ matrix.node-version != '*' }}"
5765
with:
58-
node-version: ${{ matrix.node-version }}
66+
node-version: '*'
5967
check-latest: true
6068
- name: NPM Install
6169
run: npm ci
6270
- name: Install Next.js Canary
6371
run: npm install -D next@canary --legacy-peer-deps
72+
- name: Switching to Node.js ${{ matrix.node-version }} to run tests
73+
uses: actions/setup-node@v2
74+
if: "${{ matrix.node-version != '*' }}"
75+
with:
76+
node-version: ${{ matrix.node-version }}
77+
check-latest: true
6478
- name: Run tests against next@canary
6579
run: npm test

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
"format:check:prettier": "cross-env-shell prettier --check $npm_package_config_prettier",
1616
"format:fix:prettier": "cross-env-shell prettier --write $npm_package_config_prettier",
1717
"build": "npm run -w @netlify/plugin-nextjs build",
18-
"postinstall": "npm run build",
19-
"test": "run-s build build:demo test:jest",
18+
"postinstall": "pwd && ls -l node_modules && husky install node_modules/@netlify/eslint-config-node/.husky/ && npm run build",
19+
"test": "run-s build:demo test:jest",
2020
"test:jest": "jest",
2121
"test:jest:update": "jest --updateSnapshot",
2222
"test:update": "run-s build build:demo test:jest:update"

0 commit comments

Comments
 (0)