Skip to content

Commit

Permalink
codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
ggazzo committed Dec 27, 2024
1 parent 041adfa commit 66e6a48
Showing 1 changed file with 5 additions and 31 deletions.
36 changes: 5 additions & 31 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,9 @@ on:

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
Expand All @@ -45,16 +26,9 @@ jobs:
- 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]

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
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

token: ${{ secrets.CODECOV_TOKEN }}

0 comments on commit 66e6a48

Please sign in to comment.