-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0b71ef1
commit 2072cff
Showing
3 changed files
with
48 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,40 @@ | ||
name: Tests | ||
name: Tests | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
branches: [main] | ||
pull_request: | ||
branches: [ main ] | ||
branches: [main] | ||
|
||
permissions: read-all | ||
|
||
jobs: | ||
|
||
build: | ||
name: Tests | ||
name: Tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Set up Go 1.x | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ^1.15 | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v2 | ||
|
||
- name: Test | ||
run: make test | ||
|
||
- name: Codecov | ||
uses: codecov/[email protected] | ||
- 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters