Skip to content

Commit cb89770

Browse files
authored
ci: reduce ci times and add node17 test (#3672)
1 parent 2431015 commit cb89770

File tree

1 file changed

+20
-6
lines changed

1 file changed

+20
-6
lines changed

.github/workflows/ci.yml

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,13 @@ name: Nodejs Test
55
on: [push, pull_request]
66

77
jobs:
8-
test:
8+
platform_spec_test:
99
name: 'Tests on ${{matrix.os}} with node${{matrix.node}}'
1010
strategy:
1111
matrix:
1212
# Test all mainstream operating system
1313
os: [ubuntu-latest, macos-latest, windows-latest]
14-
# Latest four Nodejs LTS version
15-
node: [10, 12, 14, 16]
14+
node: [16]
1615
runs-on: ${{ matrix.os }}
1716
steps:
1817
# Pull repo to test machine
@@ -22,7 +21,6 @@ jobs:
2221
with:
2322
# The Node.js version to configure
2423
node-version: ${{ matrix.node }}
25-
2624
# Caching dependencies to speed up workflows
2725
- name: Get npm cache directory
2826
id: npm-cache-dir
@@ -35,13 +33,29 @@ jobs:
3533
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
3634
restore-keys: |
3735
${{ runner.os }}-node-
38-
3936
- name: Install npm dependencies
4037
run: npm install
41-
4238
- name: Print put node & npm version
4339
# Output useful info for debugging.
4440
run: node --version && npm --version
41+
- name: Run unit test
42+
run: cd packages/less && npm test
4543

44+
fast_node_test:
45+
name: 'Tests on ${{matrix.os}} with node${{matrix.node}}'
46+
strategy:
47+
matrix:
48+
os: [ubuntu-latest]
49+
node: [10, 12, 14, 17]
50+
runs-on: ${{ matrix.os }}
51+
steps:
52+
- uses: actions/checkout@v2
53+
- uses: actions/setup-node@v2
54+
with:
55+
node-version: ${{ matrix.node }}
56+
- name: Install npm dependencies
57+
run: npm install
58+
- name: Print put node & npm version
59+
run: node --version && npm --version
4660
- name: Run unit test
4761
run: cd packages/less && npm test

0 commit comments

Comments
 (0)