Skip to content

Commit

Permalink
Update tests.yml
Browse files Browse the repository at this point in the history
Signed-off-by: Nikolay Dubina <[email protected]>
  • Loading branch information
nikolaydubina authored Aug 22, 2024
1 parent cc2f551 commit 6bf9aa0
Showing 1 changed file with 25 additions and 21 deletions.
46 changes: 25 additions & 21 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,28 @@ jobs:
name: Build
runs-on: ubuntu-latest
steps:

- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.20
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Get dependencies
run: go get -v -t -d ./...

- name: Test that can build
run: go build

- name: Test
run: go test -v -coverprofile=coverage.txt -covermode=atomic ./...

- name: Codecov
uses: codecov/codecov-action@v3
- name: code
uses: actions/checkout@v4

- name: go
uses: actions/setup-go@v5
with:
go-version: ^1.21

- name: test
run: |
go get -v -t -d ./...
go install github.com/jstemmer/go-junit-report/v2@latest
go test -coverprofile=coverage.out -covermode=atomic -cover -json -v ./... 2>&1 | go-junit-report -set-exit-code > tests.xml
- name: Upload test results to Codecov
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: tests.xml

- name: Upload coverage to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.out

0 comments on commit 6bf9aa0

Please sign in to comment.