1010
1111jobs :
1212 test-node :
13- name : Test on Node.js v${{ matrix.node-version }}
13+ name :
14+ # prettier-ignore
15+ Test on Node.js v${{ matrix.node-version }} and html-webpack-plugin v${{ matrix.html-plugin-version }}
1416 strategy :
1517 fail-fast : false
1618 matrix :
1719 node-version : [6.x, 8.x, 10.x, 12.x, 14.x, 15.x]
20+ html-plugin-version : [3, 4]
1821 runs-on : ubuntu-latest
1922
2023 steps :
@@ -35,10 +38,14 @@ jobs:
3538 uses : actions/setup-node@v2
3639 with :
3740 node-version : ${{ matrix.node-version }}
38- - run : yarn
41+ - name : install with html-webpack-plugin v${{matrix.html-plugin-version }}
42+ run : |
43+ yarn
44+ yarn add --dev html-webpack-plugin@${{matrix.html-plugin-version }}
3945 - name : run tests
40- run : yarn travis
46+ run : yarn cover
4147 - uses : codecov/codecov-action@v1
48+ if : ${{ matrix.html-plugin-version == 4 }}
4249 test-os :
4350 name : Test on ${{ matrix.os }} using Node.js LTS
4451 strategy :
@@ -64,14 +71,35 @@ jobs:
6471 node-version : 14.x
6572 - run : yarn
6673 - name : run tests
67- run : yarn travis
74+ run : yarn cover
75+ lint :
76+ name : Run ESLint using Node.js LTS
77+ runs-on : ubuntu-latest
78+
79+ steps :
80+ - uses : actions/checkout@v2
81+ - name : Get yarn cache directory path
82+ id : yarn-cache-dir-path
83+ run : echo "::set-output name=dir::$(yarn cache dir)"
84+ - uses : actions/cache@v2
85+ id : yarn-cache
86+ with :
87+ path : ${{ steps.yarn-cache-dir-path.outputs.dir }}
88+ key : ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
89+ restore-keys : |
90+ ${{ runner.os }}-yarn-
91+ 92+ with :
93+ node-version : 14.x
94+ - run : yarn
95+ - run : yarn lint
6896
6997 release :
7098 if :
7199 # prettier-ignore
72100 ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/main' }}
73101 name : Release new version
74- needs : [test-node, test-os]
102+ needs : [lint, test-node, test-os]
75103 runs-on : ubuntu-latest
76104 steps :
77105 - uses : actions/checkout@v2
0 commit comments