Skip to content

Commit db00563

Browse files
committed
Update the GitHub Actions CI workflow.
1 parent 218bc95 commit db00563

File tree

2 files changed

+43
-8
lines changed

2 files changed

+43
-8
lines changed

.github/workflows/ci.yml

Lines changed: 40 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,50 @@
11
name: CI
22
on: [push, workflow_dispatch]
33
jobs:
4-
test:
5-
name: Test with Node.js v${{ matrix.node }} and ${{ matrix.os }}
6-
runs-on: ${{ matrix.os }}
4+
prettier:
5+
name: Prettier
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@v4
9+
- uses: actions/setup-node@v4
10+
with:
11+
node-version: latest
12+
- run: npm install
13+
- run: node --run prettier
14+
eslint:
15+
name: ESLint
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
- uses: actions/setup-node@v4
20+
with:
21+
node-version: latest
22+
- run: npm install
23+
- run: node --run eslint
24+
types:
25+
name: Types
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: actions/checkout@v4
29+
- uses: actions/setup-node@v4
30+
with:
31+
node-version: latest
32+
- run: npm install
33+
- run: node --run types
34+
tests:
35+
name: Tests
736
strategy:
837
matrix:
938
os: [ubuntu-latest, macos-latest]
10-
node: ["18", "20", "22"]
39+
node: [18, 20, 22]
40+
runs-on: ${{ matrix.os }}
1141
steps:
1242
- uses: actions/checkout@v4
13-
- name: Setup Node.js v${{ matrix.node }}
14-
uses: actions/setup-node@v4
43+
- uses: actions/setup-node@v4
1544
with:
1645
node-version: ${{ matrix.node }}
17-
- name: npm install and test
18-
run: npm install-test
46+
- run: npm install
47+
- run: npm run tests
48+
if: matrix.node < 22
49+
- run: node --run tests
50+
if: matrix.node >= 22

changelog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@
4242
- Updated GitHub Actions CI config:
4343
- No longer run the workflow on pull request.
4444
- Enable manual workflow dispatching.
45+
- Run checks in seperate jobs.
46+
- Removed custom step names.
47+
- Replaced `npm run` with `node --run`.
4548
- Updated the tested Node.js versions to v18, v20, v22.
4649
- Updated `actions/checkout` to v4.
4750
- Updated `actions/setup-node` to v4.

0 commit comments

Comments
 (0)