@@ -3,16 +3,20 @@ name: Ensure PR
33on :
44 pull_request :
55
6+ concurrency :
7+ group : ${{ github.workflow }}-${{ github.ref }}
8+ cancel-in-progress : true
9+
610jobs :
711 unitTest :
812 name : Unit Test
913 strategy :
1014 matrix :
1115 os : [ubuntu-latest]
12- node-version : [16.x ]
16+ node-version : [latest ]
1317 runs-on : ${{ matrix.os }}
1418 steps :
15- - uses : actions/checkout@v3
19+ - uses : actions/checkout@v4
1620
1721 - name : Use Node.js ${{ matrix.node-version }}
1822 uses : actions/setup-node@v3
@@ -28,10 +32,10 @@ jobs:
2832 strategy :
2933 matrix :
3034 os : [ubuntu-latest]
31- node-version : [16.x ]
35+ node-version : [latest ]
3236 runs-on : ${{ matrix.os }}
3337 steps :
34- - uses : actions/checkout@v3
38+ - uses : actions/checkout@v4
3539
3640 - name : Use Node.js ${{ matrix.node-version }}
3741 uses : actions/setup-node@v3
@@ -50,24 +54,24 @@ jobs:
5054 os : [ubuntu-latest]
5155 runs-on : ${{ matrix.os }}
5256 steps :
53- - uses : actions/checkout@v3
57+ - uses : actions/checkout@v4
5458
5559 - name : Vale
56- uses : errata-ai/vale-action@v1.4.2
60+ uses : errata-ai/vale-action@v2.0.1
5761 with :
5862 files : src/content
5963 env :
6064 GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
6165
62- lintLinks :
63- name : Check Links
66+ testAndCheck :
67+ name : E2E test and link check
6468 strategy :
6569 matrix :
6670 os : [ubuntu-latest]
67- node-version : [16.x ]
71+ node-version : [latest ]
6872 runs-on : ${{ matrix.os }}
6973 steps :
70- - uses : actions/checkout@v3
74+ - uses : actions/checkout@v4
7175
7276 - name : Use Node.js ${{ matrix.node-version }}
7377 uses : actions/setup-node@v3
7781
7882 - run : yarn
7983
80- - name : Enable webpack persistent caching
81- uses : actions/cache@v3
82- id : build-webpack-persistent-cache
83- with :
84- path : node_modules/.cache
85- key : build-${{ hashFiles('**/webpack.*.mjs') }}-${{ hashFiles('**/yarn.lock') }}
86- restore-keys : |-
87- build-${{ hashFiles('**/webpack.*.mjs') }}-${{ hashFiles('**/yarn.lock') }}
88- build-${{ hashFiles('**/webpack.*.mjs') }}-
89-
90- - name : Build site
91- run : yarn build
92- env :
93- GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
94- - run : yarn lint:links
95-
96- e2e :
97- name : End to End Testing
98- strategy :
99- matrix :
100- os : [ubuntu-latest]
101- node-version : [16.x]
102- runs-on : ${{ matrix.os }}
103- steps :
104- - uses : actions/checkout@v3
105-
10684 - name : Enable webpack persistent caching
10785 uses : actions/cache@v3
10886 id : build-webpack-persistent-cache
@@ -114,10 +92,14 @@ jobs:
11492 build-${{ hashFiles('**/webpack.*.mjs') }}-
11593
11694 - name : Cypress run
117- uses : cypress-io/github-action@v4
95+ uses : cypress-io/github-action@v6
11896 with :
11997 browser : chrome
12098 config-file : cypress.config.js
12199 build : yarn build
122100 start : yarn serve-dist
123101 command : yarn cypress:run
102+ env :
103+ GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
104+
105+ - run : yarn lint:links
0 commit comments