generated from sonofmagic/npm-lib-template
-
-
Notifications
You must be signed in to change notification settings - Fork 91
34 lines (30 loc) · 813 Bytes
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: test
on:
pull_request:
workflow_dispatch:
permissions:
contents: write
jobs:
build:
# https://github.com/webpack/webpack/blob/main/.github/workflows/test.yml
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [18.x, 20.x, 22.x] # 16.x,
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- run: pnpm i
- run: pnpm build
- run: pnpm test
# TODO
# - uses: codecov/codecov-action@v4
# with:
# directory: coverage
# files: ./coverage/clover.xml,./coverage-vitest/clover.xml