File tree 2 files changed +12
-5
lines changed
2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change 7
7
8
8
jobs :
9
9
build-lint-test :
10
- name : build-lint-test
11
10
runs-on : ubuntu-latest
11
+ strategy :
12
+ matrix :
13
+ node_version :
14
+ - 16 # end of life 2023-09-11
15
+ - 18 # end of life 2025-04-30
16
+ - 20 # end of life 2025-04-30
17
+ name : build-lint-test - node ${{ matrix.node_version }}
12
18
steps :
13
19
- name : Check out Git repository
14
20
uses : actions/checkout@v3
15
21
16
22
- name : Set up Node.js
17
23
uses : actions/setup-node@v3
18
24
with :
19
- node-version : 16
25
+ node-version : ${{ matrix.node_version }}
20
26
21
27
- name : Get yarn cache
22
28
uses : actions/cache@v3
@@ -25,10 +31,11 @@ jobs:
25
31
path : |
26
32
**/node_modules
27
33
~/.cache
28
- key : ${{ runner.os }}-node-16 -yarn-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('.github/workflows/**.yml') }}
34
+ key : ${{ runner.os }}-repo-${{ github.event.pull_request.head.repo.full_name }}- node-${{ matrix.node_version }} -yarn-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('.github/workflows/**.yml') }}
29
35
30
36
- name : Install Node.js dependencies
31
- if : steps.yarn-cache.outputs.cache-hit != 'true'
37
+ # run when cache not found or PR is external (build fails for external PRs if dependencies are not installed)
38
+ if : steps.yarn-cache.outputs.cache-hit != 'true' || github.event.pull_request.head.repo.full_name != github.repository
32
39
run : yarn install --frozen-lockfile
33
40
34
41
- name : Build
Original file line number Diff line number Diff line change 17
17
- name : Set up Node.js
18
18
uses : actions/setup-node@v3
19
19
with :
20
- node-version : 16
20
+ node-version : 20
21
21
22
22
- name : Get yarn cache
23
23
uses : actions/cache@v3
You can’t perform that action at this time.
0 commit comments