Skip to content

Commit bcc4353

Browse files
committed
chore: add windows ci
1 parent 49cf2aa commit bcc4353

File tree

3 files changed

+26
-6
lines changed

3 files changed

+26
-6
lines changed

.github/workflows/ci.yml

+15-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@ on:
88
- main
99
jobs:
1010
test-webpack4:
11-
runs-on: ubuntu-latest
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
host: [ubuntu-latest, windows-latest]
15+
runs-on: ${{ matrix.host }}
1216
steps:
1317
- uses: actions/checkout@v2
1418
- name: Set node version to 16
@@ -20,7 +24,11 @@ jobs:
2024
- run: yarn test:webpack4
2125

2226
test-webpack5:
23-
runs-on: ubuntu-latest
27+
strategy:
28+
fail-fast: false
29+
matrix:
30+
host: [ubuntu-latest, windows-latest]
31+
runs-on: ${{ matrix.host }}
2432
steps:
2533
- uses: actions/checkout@v2
2634
- name: Set node version to 16
@@ -32,7 +40,11 @@ jobs:
3240
- run: yarn test
3341

3442
test-webpack5-inline-match-resource:
35-
runs-on: ubuntu-latest
43+
strategy:
44+
fail-fast: false
45+
matrix:
46+
host: [ubuntu-latest, windows-latest]
47+
runs-on: ${{ matrix.host }}
3648
steps:
3749
- uses: actions/checkout@v2
3850
- name: Set node version to 16

package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
"pretest": "tsc",
1616
"test": "jest",
1717
"pretest:match-resource": "tsc",
18-
"test:match-resource": "INLINE_MATCH_RESOURCE=true jest",
18+
"test:match-resource": "cross-env INLINE_MATCH_RESOURCE=true jest",
1919
"pretest:webpack4": "tsc",
20-
"test:webpack4": "WEBPACK4=true jest",
20+
"test:webpack4": "cross-env WEBPACK4=true jest",
2121
"dev-example": "node example/devServer.js --config example/webpack.config.js --inline --hot",
2222
"build-example": "rm -rf example/dist && webpack --config example/webpack.config.js --env.prod",
2323
"build-example-ssr": "rm -rf example/dist-ssr && webpack --config example/webpack.config.js --env.prod --env.ssr && node example/ssr.js",
@@ -64,6 +64,7 @@
6464
"babel-loader": "^8.1.0",
6565
"cache-loader": "^4.1.0",
6666
"conventional-changelog-cli": "^2.1.1",
67+
"cross-env": "^7.0.3",
6768
"css-loader": "^4.3.0",
6869
"file-loader": "^6.1.0",
6970
"html-webpack-plugin": "^4.5.0",

yarn.lock

+8-1
Original file line numberDiff line numberDiff line change
@@ -3351,6 +3351,13 @@ create-hmac@^1.1.0, create-hmac@^1.1.4, create-hmac@^1.1.7:
33513351
safe-buffer "^5.0.1"
33523352
sha.js "^2.4.8"
33533353

3354+
cross-env@^7.0.3:
3355+
version "7.0.3"
3356+
resolved "https://registry.npmjs.org/cross-env/-/cross-env-7.0.3.tgz#865264b29677dc015ba8418918965dd232fc54cf"
3357+
integrity sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==
3358+
dependencies:
3359+
cross-spawn "^7.0.1"
3360+
33543361
cross-spawn@^5.0.1:
33553362
version "5.1.0"
33563363
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449"
@@ -3371,7 +3378,7 @@ cross-spawn@^6.0.0, cross-spawn@^6.0.5:
33713378
shebang-command "^1.2.0"
33723379
which "^1.2.9"
33733380

3374-
cross-spawn@^7.0.0:
3381+
cross-spawn@^7.0.0, cross-spawn@^7.0.1:
33753382
version "7.0.3"
33763383
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6"
33773384
integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==

0 commit comments

Comments
 (0)