-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
82225e7
commit 66f4d80
Showing
1 changed file
with
18 additions
and
26 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,32 +1,24 @@ | ||
name: Node.js CI | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
on: [push, pull_request] | ||
jobs: | ||
build: | ||
run: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [16.x, 18.x] | ||
|
||
node-version: [18.x, 20.x] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'yarn' | ||
|
||
- name: Install dependencies | ||
run: yarn install | ||
|
||
- name: Run tests | ||
run: yarn test:cov | ||
|
||
- name: Upload coverage to Codecov | ||
run: yarn coverage | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'yarn' | ||
- name: Install dependencies | ||
run: yarn install | ||
- name: Run tests and collect coverage | ||
run: yarn test:cov | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v4 | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |