1
- name : Node.js CI
1
+ name : Build, Test, Lint, Format ( Node.js)
2
2
3
3
on : [pull_request]
4
4
@@ -16,42 +16,26 @@ jobs:
16
16
uses : actions/setup-node@v3
17
17
with :
18
18
node-version : ${{ matrix.node-version }}
19
- # - name: Cache node modules
20
- # uses: actions/cache@v1
21
- # with:
22
- # path: node_modules
23
- # key: ${{ matrix.os }}-${{ matrix.node-version }}-build-${{ hashFiles('**/package-lock.json') }}
24
- # restore-keys: |
25
- # ${{ matrix.os }}-${{ matrix.node-version }}-build-${{ env.cache-name }}-
26
- # ${{ matrix.os }}-${{ matrix.node-version }}-build-
27
- # ${{ matrix.os }}-${{ matrix.node-version }}-
28
- # - name: Cache Cypress
29
- # uses: actions/cache@v1
30
- # with:
31
- # path: /home/runner/.cache/Cypress
32
- # key: ${{ matrix.os }}-${{ matrix.node-version }}-cypress-${{ hashFiles('**/package-lock.json') }}
33
- # restore-keys: |
34
- # ${{ matrix.os }}-${{ matrix.node-version }}-cypress-${{ env.cache-name }}-
35
- # ${{ matrix.os }}-${{ matrix.node-version }}-cypress-
36
- # ${{ matrix.os }}-${{ matrix.node-version }}-
37
19
- name : install latest npm
38
- run : |
39
- npm install -g npm@latest
40
- - name : npm install, build, and test
41
- run : |
42
- npm install
43
- npm run build --if-present
44
- npm test
20
+ run : npm install -g npm@latest
21
+ - name : npm install
22
+ run : npm install
45
23
env :
46
24
CI : true
47
- - name : check formatting
48
- if : always()
25
+ - name : npm run build --if-present
26
+ run : npm run build --if-present
27
+ env :
28
+ CI : true
29
+ - name : npm test
30
+ run : npm test
31
+ env :
32
+ CI : true
33
+ - name : npm run format:check
49
34
run : npm run format:check
50
35
env :
51
36
CI : true
52
37
NODE_ENV : test
53
- - name : lint
54
- if : always()
38
+ - name : npm run lint
55
39
run : npm run lint
56
40
env :
57
41
CI : true
0 commit comments