Skip to content

Commit

Permalink
ci: use octcov instead codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
aereal committed Dec 12, 2023
1 parent 1258441 commit d35f194
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 2 deletions.
22 changes: 20 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,24 @@ jobs:
with:
go-version: ${{ matrix.go_version }}
- name: test
run: go test -race -coverprofile=coverage.txt -covermode=atomic ./...
- uses: codecov/codecov-action@v3
run: go test -race -coverprofile=coverage.out -covermode=atomic ./...
- uses: actions/upload-artifact@v3
if: matrix.os == 'ubuntu-latest' && matrix.go_version == '1.17.x'
with:
name: coverage
path: ./cover.out
if-no-files-found: error
report-coverage:
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
pull-requests: write
needs:
- test
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v3
with:
name: coverage
- uses: k1LoW/octocov-action@v0
22 changes: 22 additions & 0 deletions .octocov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---

coverage:
if: true
codeToTestRatio:
code:
- '**/*.go'
- '!**/*_test.go'
test:
- '**/*_test.go'
testExecutionTime:
if: true
diff:
datastores:
- artifact://${GITHUB_REPOSITORY}
report:
datastores:
- artifact://${GITHUB_REPOSITORY}
comment:
if: is_pull_request
summary:
if: is_pull_request

0 comments on commit d35f194

Please sign in to comment.