Skip to content

Commit

Permalink
Update: Add golang v1.20 and v1.21 to build (#5)
Browse files Browse the repository at this point in the history
* Update: Add golang v1.20 and v1.21 to build

* Update: Only run golang v1.20 and v1.21
  • Loading branch information
Eric Powers authored Sep 18, 2023
1 parent ed25683 commit 797aa23
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 23 deletions.
20 changes: 4 additions & 16 deletions .github/workflows/build-go.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,12 @@ jobs:
fail-fast: false
matrix:
go:
- 1.17
- 1.18
- 1.19
- "1.20"
- "1.21"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: actions/setup-go@v2
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}

Expand All @@ -35,17 +34,6 @@ jobs:
go install github.com/securego/gosec/cmd/gosec@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
Expand Down
7 changes: 2 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@ lint:
--enable=ineffassign \
--enable=revive \
--enable=unused \
--enable=structcheck \
--enable=staticcheck \
--enable=varcheck \
--enable=deadcode \
--enable=unconvert \
--enable=misspell \
--enable=prealloc \
Expand All @@ -32,8 +29,8 @@ test:
@ echo "Converting the coverage file..."
gocov convert ./unit_coverage.cov | gocov-xml > ./coverage.xml
integration:
go run examples/tests/main.go test
go run examples/suites/main.go test
go run examples/tests/main.go test
go run examples/suites/main.go test

sec:
gosec -quiet ./...
4 changes: 2 additions & 2 deletions printer.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (

var printLock = &sync.Mutex{}

func printSetupError(id, suite, name string, recovery interface{}, err error) {
func printSetupError(id, _, name string, recovery interface{}, err error) {

printLock.Lock()
defer printLock.Unlock()
Expand Down Expand Up @@ -74,7 +74,7 @@ func createHeader(currTest testRun, results []testResult, showOnSuccess bool) (f
goterm.GREEN,
)
currTest.testInfo.WriteHeader([]byte(output)) // nolint
return
return failed
}

color := goterm.GREEN
Expand Down

0 comments on commit 797aa23

Please sign in to comment.