-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (48 loc) · 1.14 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Run Test
run-name: 'TEST@${{github.ref_name}}'
on:
workflow_call:
push:
branches:
- main
paths:
- '*'
- src/**
- '!**.md'
concurrency:
group: test-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Test & build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
node-version: [20.x]
steps:
- uses: mato533/cicd-actions/setup-pnpm@main
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: Type check
run: pnpm run typecheck
- name: Run the test
run: pnpm run test
- name: Build
run: pnpm run build
coverage:
name: Upload coverage to code climate
runs-on: ubuntu-latest
needs:
- test
if: github.event_name == 'push'
steps:
- uses: mato533/cicd-actions/setup-pnpm@main
with:
cache: 'pnpm'
- uses: paambaati/codeclimate-action@v9
env:
CC_TEST_REPORTER_ID: ${{ secrets.CODE_CLIMATE }}
with:
coverageCommand: pnpm run coverage