Skip to content

Commit

Permalink
add readme job -fix2
Browse files Browse the repository at this point in the history
  • Loading branch information
t34-dev committed Aug 2, 2024
1 parent 5d0b765 commit 57695c0
Showing 1 changed file with 6 additions and 26 deletions.
32 changes: 6 additions & 26 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Coverage
name: coverage

on:
push:
Expand All @@ -17,33 +17,13 @@ jobs:
with:
go-version: '1.22'

- name: Go Cache
uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Download dependencies
run: go mod download

- name: Run tests and generate coverage
run: |
go test -v -race -coverprofile=coverage.txt -covermode=atomic $(go list ./... | grep -v /example)
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
file: ./coverage.txt
flags: unittests

- name: Install goveralls
run: go install github.com/mattn/goveralls@latest

- name: Send coverage to Coveralls
- name: Run tests
run: go test -v -coverprofile=coverage.out $(go list ./... | grep -v /example)

- name: Send coverage
env:
COVERALLS_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: goveralls -coverprofile=coverage.txt -service=github
run: goveralls -coverprofile=coverage.out -service=github

0 comments on commit 57695c0

Please sign in to comment.