Skip to content

ci: 规范工作流程 #28

ci: 规范工作流程

ci: 规范工作流程 #28

Workflow file for this run

name: Test
on:
push:
branches:
- '*'
tags-ignore:
- '*'
pull_request:
branches:
jobs:
test:
if: "!contains(toJson(github.event.commits), '[skip ci]')"
strategy:
matrix:
node-version: [18.x, 20.x, 22.x]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- run: pnpm install
- run: pnpm test
- name: Upload Coverage
if: github.ref == 'refs/heads/master' && strategy.job-index == 0
uses: codecov/codecov-action@v3
with:
verbose: true
fail_ci_if_error: true