-
-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update the GitHub Actions CI workflow.
- Loading branch information
1 parent
218bc95
commit db00563
Showing
2 changed files
with
43 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters