File tree Expand file tree Collapse file tree 1 file changed +28
-1
lines changed
Expand file tree Collapse file tree 1 file changed +28
-1
lines changed Original file line number Diff line number Diff line change 1414
1515name : my-workflow
1616jobs :
17+ base_branch_cov :
18+ runs-on : ubuntu-latest
19+ steps :
20+ - uses : actions/checkout@v4
21+ with :
22+ ref : ${{ github.base_ref }}
23+ - uses : oven-sh/setup-bun@v2
24+
25+ - run : bun install
26+ - run : bun test:coverage
27+
28+
29+ - name : Upload code coverage for ref branch
30+ uses : actions/upload-artifact@v3
31+ with :
32+ name : ref-lcov.info
33+ path : ./coverage/lcov.info
34+
1735 unit-tests :
1836 name : Code Quality Checks(lint, test, tsc)
1937 runs-on : ubuntu-latest
38+ needs : base_branch_cov
2039 steps :
2140 # ...
2241 - uses : actions/checkout@v4
2342 - uses : oven-sh/setup-bun@v2
2443
25- # run any `bun` or `bunx` command
2644 - run : bun install
2745 - run : bun lint
2846 - run : bun tsc
2947 - run : bun test:coverage
48+ - name : Download code coverage report from base branch
49+ uses : actions/download-artifact@v3
50+ with :
51+ name : ref-lcov.info
3052 - uses : barecheck/code-coverage-action@v1.0.0
3153 with :
3254 barecheck-github-app-token : ${{ secrets.BARECHECK_GITHUB_APP_TOKEN }}
55+ lcov-file : " ./coverage/lcov.info"
56+ base-lcov-file : " ./lcov.info"
57+ minimum-ratio : 0 # Fails Github action once code coverage is decreasing
58+ send-summary-comment : true
59+ show-annotations : " warning" # Possible options warning|error
3360
You can’t perform that action at this time.
0 commit comments