Skip to content

Commit

Permalink
ci: reduce ci times and add node17 test (#3672)
Browse files Browse the repository at this point in the history
  • Loading branch information
iChenLei authored Dec 25, 2021
1 parent 2431015 commit cb89770
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@ name: Nodejs Test
on: [push, pull_request]

jobs:
test:
platform_spec_test:
name: 'Tests on ${{matrix.os}} with node${{matrix.node}}'
strategy:
matrix:
# Test all mainstream operating system
os: [ubuntu-latest, macos-latest, windows-latest]
# Latest four Nodejs LTS version
node: [10, 12, 14, 16]
node: [16]
runs-on: ${{ matrix.os }}
steps:
# Pull repo to test machine
Expand All @@ -22,7 +21,6 @@ jobs:
with:
# The Node.js version to configure
node-version: ${{ matrix.node }}

# Caching dependencies to speed up workflows
- name: Get npm cache directory
id: npm-cache-dir
Expand All @@ -35,13 +33,29 @@ jobs:
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install npm dependencies
run: npm install

- name: Print put node & npm version
# Output useful info for debugging.
run: node --version && npm --version
- name: Run unit test
run: cd packages/less && npm test

fast_node_test:
name: 'Tests on ${{matrix.os}} with node${{matrix.node}}'
strategy:
matrix:
os: [ubuntu-latest]
node: [10, 12, 14, 17]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- name: Install npm dependencies
run: npm install
- name: Print put node & npm version
run: node --version && npm --version
- name: Run unit test
run: cd packages/less && npm test

0 comments on commit cb89770

Please sign in to comment.