-
Notifications
You must be signed in to change notification settings - Fork 0
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
6ab8d2b
commit 5058b02
Showing
1 changed file
with
37 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Tests | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
||
concurrency: | ||
group: ci-${{ github.ref }}-tests | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
tests: | ||
name: Tests and code coverage | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install GO | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: "1.22" | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- uses: technote-space/[email protected] | ||
with: | ||
PATTERNS: | | ||
**/**.go | ||
go.mod | ||
go.sum | ||
- name: run all tests and generate coverage | ||
run: go test -v -mod=readonly -timeout 30m -coverprofile=coverage.txt -tags='norace' -covermode=atomic `go list ./... | grep -v simapp` | ||
if: env.GIT_DIFF | ||
- name: Upload codecov report | ||
uses: codecov/[email protected] | ||
with: | ||
file: coverage.txt | ||
if: env.GIT_DIFF |