generated from jasonkuhrt/template-typescript-lib
-
Notifications
You must be signed in to change notification settings - Fork 1
64 lines (63 loc) · 1.6 KB
/
pr.yaml
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: pr
concurrency:
group: ${{github.head_ref}}
cancel-in-progress: true
on:
- pull_request
jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
- run: pnpm add dprint
- run: pnpm check:format
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
- run: pnpm build
- run: pnpm check:lint
publint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
- run: pnpm build
- run: pnpm check:publint
types:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
- run: pnpm check:types
test:
strategy:
matrix:
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
node-version: [18.x, 20.x, 22.x]
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
with:
node-version: ${{matrix.node-version}}
- run: pnpm build
- run: pnpm test
test-coverage:
name: Run tests and collect coverage
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup environment, cache, and dependencies
uses: ./.github/actions/setup
- name: Run tests with coverage
run: pnpm test:coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
token: ${{secrets.CODECOV_TOKEN}}