-
Notifications
You must be signed in to change notification settings - Fork 2
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
d0ef560
commit 8f8f5fb
Showing
4 changed files
with
11 additions
and
34 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -19,45 +19,27 @@ jobs: | |
fail-fast: false | ||
matrix: | ||
go: | ||
- 1.17 | ||
- 1.18 | ||
- 1.19 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-go@v2 | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: ${{ matrix.go }} | ||
cache: true | ||
|
||
- name: setup | ||
run: | | ||
go version | ||
go install github.com/securego/gosec/cmd/gosec@latest | ||
#go install golang.org/x/tools/cmd/cover@latest | ||
go install github.com/axw/gocov/gocov@master | ||
go install github.com/AlekSi/gocov-xml@latest | ||
- name: setup-for-older-go | ||
if: ${{ matrix.go <= 1.17 }} | ||
run: | | ||
# stay on an older version of golangci-lint which still builds against 1.17 | ||
# This is due to the introduction of generics. | ||
go install github.com/golangci/golangci-lint/cmd/[email protected] | ||
- name: setup-for-newer-go | ||
if: ${{ matrix.go > 1.17 }} | ||
run: | | ||
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest | ||
- name: build | ||
run: | | ||
make | ||
# note: uncertain how gracefully this handles the matrix | ||
- name: coverage | ||
uses: codacy/codacy-coverage-reporter-action@v1 | ||
- uses: PaloAltoNetworks/[email protected] | ||
if: ${{matrix.go == 1.19}} | ||
with: | ||
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} | ||
|
||
# a comma-separated list | ||
coverage-reports: "./coverage.xml" | ||
main_branch: master | ||
cov_file: unit_coverage.out | ||
cov_threshold: "85" |
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,6 +3,6 @@ midgardctl/midgardctl | |
testresults.xml | ||
vendor | ||
*.lock | ||
*.cov | ||
unit_coverage.out | ||
artifacts | ||
dist |
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