Skip to content

Commit

Permalink
chore: improve ci speed by splitting lint and test (#1252)
Browse files Browse the repository at this point in the history
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
  • Loading branch information
typicode and paescuj committed Apr 25, 2023
1 parent eadf173 commit 65b161f
Showing 1 changed file with 24 additions and 26 deletions.
50 changes: 24 additions & 26 deletions .github/workflows/node.js.yml
Expand Up @@ -5,34 +5,32 @@ name: Node.js CI
on: [push]

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [14, 16, 18]
os: [ubuntu-latest, macOS-latest]
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm --version
- run: npm ci --ignore-scripts
- run: npm test
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- run: npm ci --ignore-scripts
- run: npm run lint

# Node 14 comes with npm 6 which has issues on Windows
# Skipping tests on Windows with Node 14
build-windows:
runs-on: ${{ matrix.os }}
test:
strategy:
matrix:
node-version: [16, 18]
os: [windows-latest]
node-version: [14, 16, 18]
os: [ubuntu-latest, macOS-latest, windows-latest]
# Node.js 14 comes with npm 6 which has issues on Windows
# therefore skipping tests on Windows with Node.js 14
exclude:
- os: windows-latest
node-version: 14
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm --version
- run: npm ci --ignore-scripts
- run: npm test
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm --version
- run: npm ci --ignore-scripts
- run: npm test

0 comments on commit 65b161f

Please sign in to comment.