Skip to content

Commit

Permalink
chore: ci
Browse files Browse the repository at this point in the history
  • Loading branch information
chunkai1312 committed Oct 5, 2024
1 parent 82225e7 commit 66f4d80
Showing 1 changed file with 18 additions and 26 deletions.
44 changes: 18 additions & 26 deletions .github/workflows/node.js.yml
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 }}

0 comments on commit 66f4d80

Please sign in to comment.