Skip to content

Commit

Permalink
Update the GitHub Actions CI workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaydenseric committed Oct 8, 2024
1 parent 218bc95 commit db00563
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 8 deletions.
48 changes: 40 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,50 @@
name: CI
on: [push, workflow_dispatch]
jobs:
test:
name: Test with Node.js v${{ matrix.node }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
prettier:
name: Prettier
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: latest
- run: npm install
- run: node --run prettier
eslint:
name: ESLint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: latest
- run: npm install
- run: node --run eslint
types:
name: Types
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: latest
- run: npm install
- run: node --run types
tests:
name: Tests
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
node: ["18", "20", "22"]
node: [18, 20, 22]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Setup Node.js v${{ matrix.node }}
uses: actions/setup-node@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- name: npm install and test
run: npm install-test
- run: npm install
- run: npm run tests
if: matrix.node < 22
- run: node --run tests
if: matrix.node >= 22
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@
- Updated GitHub Actions CI config:
- No longer run the workflow on pull request.
- Enable manual workflow dispatching.
- Run checks in seperate jobs.
- Removed custom step names.
- Replaced `npm run` with `node --run`.
- Updated the tested Node.js versions to v18, v20, v22.
- Updated `actions/checkout` to v4.
- Updated `actions/setup-node` to v4.
Expand Down

0 comments on commit db00563

Please sign in to comment.