Skip to content

Commit ebf324d

Browse files
committed
test: reduce workflow size
1 parent e8934b8 commit ebf324d

File tree

1 file changed

+43
-8
lines changed

1 file changed

+43
-8
lines changed

.github/workflows/nodejs.yml

+43-8
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,13 @@ jobs:
5050
uses: wagoid/commitlint-github-action@v1
5151

5252
test:
53-
name: Test - ${{ matrix.os }} - Node v${{ matrix.node-version }}, Webpack ${{ matrix.webpack-version }}, experimentalUseImportModule ${{ matrix.experimental-use-import-module }}
53+
name: Test - ${{ matrix.os }} - Node v${{ matrix.node-version }}, Webpack ${{ matrix.webpack-version }}
5454

5555
strategy:
5656
matrix:
5757
os: [ubuntu-latest, windows-latest, macos-latest]
5858
node-version: [10.x, 12.x, 14.x]
5959
webpack-version: [4, latest]
60-
experimental-use-import-module: [false, true]
61-
exclude:
62-
- webpack-version: 4
63-
experimental-use-import-module: true
6460

6561
runs-on: ${{ matrix.os }}
6662

@@ -91,11 +87,50 @@ jobs:
9187
run: npm i webpack@${{ matrix.webpack-version }}
9288

9389
- name: Run tests for webpack version ${{ matrix.webpack-version }}
94-
if: ${{ !matrix.experimental-use-import-module }}
9590
run: npm run test:coverage -- --ci
9691

97-
- name: Run optional tests for webpack version ${{ matrix.webpack-version }} with import module
98-
if: ${{ matrix.experimental-use-import-module }}
92+
- name: Submit coverage data to codecov
93+
uses: codecov/codecov-action@v1
94+
with:
95+
token: ${{ secrets.CODECOV_TOKEN }}
96+
97+
test2:
98+
name: Test - ${{ matrix.os }} - Node v${{ matrix.node-version }}, Webpack latest, experimentalUseImportModule
99+
100+
strategy:
101+
matrix:
102+
os: [ubuntu-latest, windows-latest, macos-latest]
103+
node-version: [10.x, 12.x, 14.x]
104+
105+
runs-on: ${{ matrix.os }}
106+
107+
steps:
108+
- name: Setup Git
109+
if: matrix.os == 'windows-latest'
110+
run: git config --global core.autocrlf input
111+
112+
- uses: actions/checkout@v2
113+
114+
- name: Use Node.js ${{ matrix.node-version }}
115+
uses: actions/setup-node@v1
116+
with:
117+
node-version: ${{ matrix.node-version }}
118+
119+
- name: Use latest NPM on ubuntu/macos
120+
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
121+
run: sudo npm i -g npm
122+
123+
- name: Use latest NPM on windows
124+
if: matrix.os == 'windows-latest'
125+
run: npm i -g npm
126+
127+
- name: Install dependencies
128+
run: npm i
129+
130+
- name: Install webpack latest
131+
run: npm i webpack@latest
132+
133+
- name: Run tests for webpack version latest with experimentalUseImportModule
99134
run: EXPERIMENTAL_USE_IMPORT_MODULE=true npm run test:coverage -- --ci
100135

101136
- name: Submit coverage data to codecov

0 commit comments

Comments
 (0)