Skip to content

Commit

Permalink
chore: use npm in CI action
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeed committed Apr 24, 2023
1 parent 886cc96 commit a39f7a8
Showing 1 changed file with 11 additions and 14 deletions.
25 changes: 11 additions & 14 deletions .github/workflows/ci.yml
Expand Up @@ -8,36 +8,33 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
nodejs: [10, 12, 14, 16]
nodejs: [10, 12, 14, 16, 18]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.nodejs }}

- name: (env) pnpm
run: curl -L https://raw.githubusercontent.com/pnpm/self-installer/master/install.js | node

- name: Install
run: pnpm install
run: npm install

- name: (coverage) Install
if: matrix.nodejs >= 16
run: pnpm add -g c8
if: matrix.nodejs >= 18
run: npm install -g c8

- name: Build
run: pnpm run build
run: npm run build

- name: Test
if: matrix.nodejs < 16
run: pnpm test
if: matrix.nodejs < 18
run: npm test

- name: (coverage) Test
if: matrix.nodejs >= 16
run: c8 --include=packages pnpm test
if: matrix.nodejs >= 18
run: c8 --include=packages npm test

- name: (coverage) Report
if: matrix.nodejs >= 16
if: matrix.nodejs >= 18
run: |
c8 report --reporter=text-lcov > coverage.lcov
bash <(curl -s https://codecov.io/bash)
Expand Down

0 comments on commit a39f7a8

Please sign in to comment.