Skip to content

chore(ci): use pnpm action w/ standalone #113

chore(ci): use pnpm action w/ standalone

chore(ci): use pnpm action w/ standalone #113

Workflow file for this run

name: Node.js CI
on:
push:
branches:
- master
- next
paths-ignore:
- 'bench/**'
- 'examples/**'
pull_request:
branches:
- master
- next
paths-ignore:
- 'bench/**'
- 'examples/**'
jobs:
test:
name: Node.js v${{ matrix.nodejs }}
runs-on: ubuntu-latest
strategy:
matrix:
nodejs: [10, 12, 14, 16, 18]
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2.2.4
with:
version: 7.13.5
standalone: true
- uses: actions/setup-node@v3
with:
cache: 'pnpm'
node-version: ${{ matrix.nodejs }}
- name: (env) pnpm store path
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: (env) cache
uses: actions/cache@v3
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-${{ matrix.nodejs }}-${{ hashFiles('**/package.json') }}
restore-keys: ${{ runner.os }}-${{ matrix.nodejs }}-
- name: Install
run: |
pnpm install
pnpm add -g nyc
- name: Linter
run: pnpm linter
- name: Test w/ Coverage
run: nyc --include=packages pnpm test
- name: Report
if: matrix.nodejs >= 18
run: |
nyc report --reporter=text-lcov > coverage.lcov
bash <(curl -s https://codecov.io/bash)
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}