-
Notifications
You must be signed in to change notification settings - Fork 2
60 lines (52 loc) · 1.47 KB
/
ci.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
57
58
59
60
on:
release:
types: [published]
pull_request:
branches: '**'
paths-ignore:
- '**.md'
push:
branches:
- main
paths-ignore:
- '**.md'
name: my-workflow
jobs:
base_branch_cov:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.base_ref }}
- uses: oven-sh/setup-bun@v2
- run: bun install
- run: bun test:coverage
- name: Upload code coverage for ref branch
uses: actions/upload-artifact@v3
with:
name: ref-lcov.info
path: ./coverage/lcov.info
unit-tests:
name: Code Quality Checks(lint, test, tsc)
runs-on: ubuntu-latest
needs: base_branch_cov
steps:
# ...
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- run: bun install
- run: bun lint
- run: bun tsc
- run: bun test:coverage
- name: Download code coverage report from base branch
uses: actions/download-artifact@v3
with:
name: ref-lcov.info
- uses: barecheck/[email protected]
with:
barecheck-github-app-token: ${{ secrets.BARECHECK_GITHUB_APP_TOKEN }}
lcov-file: "./coverage/lcov.info"
base-lcov-file: "./lcov.info"
minimum-ratio: 0 # Fails Github action once code coverage is decreasing
send-summary-comment: true
show-annotations: "warning" # Possible options warning|error