Skip to content

Commit e53408f

Browse files
committed
Merge branch 'main' into webpack5fix
2 parents a50602c + 77e5de2 commit e53408f

File tree

3 files changed

+27
-35
lines changed

3 files changed

+27
-35
lines changed

.github/workflows/node.js.yml

Lines changed: 20 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@ on:
1010

1111
jobs:
1212
test-node:
13-
name:
14-
# prettier-ignore
15-
Test on Node.js v${{ matrix.node-version }} and html-webpack-plugin v${{ matrix.html-plugin-version }} and webpack v${{ matrix.webpack-version }}
13+
name: Test on Node.js v${{ matrix.node-version }} and html-webpack-plugin v${{ matrix.html-plugin-version }} and webpack v${{ matrix.webpack-version }}
1614
strategy:
1715
fail-fast: false
1816
matrix:
@@ -35,6 +33,15 @@ jobs:
3533
webpack-version: 5
3634
- node-version: 8.x
3735
html-plugin-version: 5
36+
include:
37+
- node-version: 10.x
38+
install-puppeteer: true
39+
- node-version: 12.x
40+
install-puppeteer: true
41+
- node-version: 14.x
42+
install-puppeteer: true
43+
- node-version: 15.x
44+
install-puppeteer: true
3845
runs-on: ubuntu-latest
3946

4047
steps:
@@ -55,13 +62,17 @@ jobs:
5562
uses: actions/setup-node@v2
5663
with:
5764
node-version: ${{ matrix.node-version }}
58-
# prettier-ignore
5965
- name: install with html-webpack-plugin v${{matrix.html-plugin-version }} and webpack v${{ matrix.webpack-version }}
6066
run: |
6167
yarn
6268
yarn add --dev html-webpack-plugin@${{matrix.html-plugin-version }} webpack@${{ matrix.webpack-version }}
6369
git checkout yarn.lock
64-
70+
- name: install puppeteer
71+
if: ${{ matrix.install-puppeteer }}
72+
run: |
73+
yarn add --dev puppeteer
74+
yarn example
75+
git checkout yarn.lock
6576
- name: run tests
6677
run: yarn cover
6778
- uses: codecov/codecov-action@v1
@@ -90,36 +101,13 @@ jobs:
90101
with:
91102
node-version: 14.x
92103
- run: yarn
93-
- name: run tests
94-
run: yarn cover
95-
test-browser:
96-
name: Test DLL example with Puppeteer
97-
runs-on: ubuntu-latest
98-
99-
steps:
100-
- uses: actions/checkout@v2
101-
- name: Get yarn cache directory path
102-
id: yarn-cache-dir-path
103-
run: echo "::set-output name=dir::$(yarn cache dir)"
104-
- uses: actions/cache@v2
105-
id: yarn-cache
106-
with:
107-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
108-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
109-
restore-keys: |
110-
${{ runner.os }}-yarn-
111-
- uses: actions/[email protected]
112-
with:
113-
node-version: 14.x
114104
- name: install puppeteer
115105
run: |
116-
yarn
117106
yarn add --dev puppeteer
107+
yarn example
118108
git checkout yarn.lock
119-
- name: run examples
120-
run: yarn example
121109
- name: run tests
122-
run: yarn jest
110+
run: yarn cover
123111
lint:
124112
name: Run ESLint using Node.js LTS
125113
runs-on: ubuntu-latest
@@ -143,11 +131,9 @@ jobs:
143131
- run: yarn lint
144132

145133
release:
146-
if:
147-
# prettier-ignore
148-
${{ github.event_name == 'push' && github.event.ref == 'refs/heads/main' }}
134+
if: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/main' }}
149135
name: Release new version
150-
needs: [lint, test-node, test-os, test-browser]
136+
needs: [lint, test-node, test-os]
151137
runs-on: ubuntu-latest
152138
steps:
153139
- uses: actions/checkout@v2

package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,12 @@
121121
"options": {
122122
"trailingComma": "es5"
123123
}
124+
},
125+
{
126+
"files": ".github/workflows/**/*.yml",
127+
"options": {
128+
"printWidth": 175
129+
}
124130
}
125131
]
126132
},

puppeteer.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ let browser;
99

1010
(() => {
1111
try {
12-
// eslint-disable-next-line global-require,import/no-unresolved
12+
// eslint-disable-next-line global-require,import/no-unresolved,import/no-extraneous-dependencies
1313
puppeteer = require('puppeteer');
1414
} catch (error) {
1515
if (error.code !== 'MODULE_NOT_FOUND') {

0 commit comments

Comments
 (0)