-
Notifications
You must be signed in to change notification settings - Fork 1
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
5b221fc
commit e7a771c
Showing
1 changed file
with
14 additions
and
22 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 |
---|---|---|
|
@@ -3,9 +3,6 @@ name: Tests | |
on: | ||
pull_request: | ||
types: [opened, reopened, synchronize] | ||
push: | ||
branches: | ||
- "main" | ||
|
||
jobs: | ||
build: | ||
|
@@ -45,24 +42,19 @@ jobs: | |
run: go build . | ||
|
||
- name: Test with the Go CLI | ||
run: go test -cover -coverprofile=coverage.txt ./... | ||
run: go test ./... -coverprofile=./cover.out -covermode=atomic -coverpkg=./... | ||
|
||
- name: Archive code coverage results | ||
uses: actions/upload-artifact@v4 | ||
- name: check test coverage | ||
uses: vladopajic/go-test-coverage@v2 | ||
with: | ||
name: code-coverage | ||
path: coverage.txt | ||
|
||
code_coverage: | ||
name: "Code coverage report" | ||
runs-on: ubuntu-latest | ||
needs: build | ||
permissions: | ||
contents: read | ||
actions: read | ||
pull-requests: write | ||
steps: | ||
- uses: fgrosse/[email protected] | ||
with: | ||
coverage-artifact-name: "code-coverage" | ||
coverage-file-name: "coverage.txt" | ||
# Configure action using config file (option 1) | ||
config: ./.testcoverage.yml | ||
|
||
# Configure action by specifying input parameters individually (option 2). | ||
# If you are using config file (option 1) you shouldn't use these parameters, however | ||
# specifing these action parameters will override appropriate config values. | ||
profile: cover.out | ||
local-prefix: github.com/algorandfoundation/hack-tui | ||
threshold-file: 80 | ||
threshold-package: 80 | ||
threshold-total: 95 |