diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml index 73666d545..bca36886f 100644 --- a/.github/workflows/build-pr.yml +++ b/.github/workflows/build-pr.yml @@ -8,13 +8,20 @@ on: jobs: run: runs-on: ubuntu-latest + + strategy: + matrix: + go: [1.18.x, 1.19.x, 1.20.x] + steps: - name: checkout source code uses: actions/checkout@master + - name: setup go environment - uses: actions/setup-go@v1 + uses: actions/setup-go@v3 with: - go-version: '1.17.2' + go-version: ${{ matrix.go }} + - name: run tests run: | export PATH="$(go env GOPATH)/bin:${PATH}" @@ -26,7 +33,7 @@ jobs: go get -d ./schema/... make .govet - make .golint + make .lint make .gitvalidation make docs diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9045dd4e2..481e4e34b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,13 +8,20 @@ on: jobs: run: runs-on: ubuntu-latest + + strategy: + matrix: + go: [1.18.x, 1.19.x, 1.20.x] + steps: - name: checkout source code uses: actions/checkout@master + - name: setup go environment - uses: actions/setup-go@v1 + uses: actions/setup-go@v3 with: - go-version: '1.17.2' + go-version: ${{ matrix.go }} + - name: run tests run: | export PATH="$(go env GOPATH)/bin:${PATH}" @@ -26,7 +33,7 @@ jobs: go get -d ./schema/... make .govet - make .golint + make .lint make .gitvalidation make docs diff --git a/.gitignore b/.gitignore index f9663c923..fcef5e4a6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +go.mod +go.sum output schema/validate version.md diff --git a/Makefile b/Makefile index 7a61610db..1dfbac659 100644 --- a/Makefile +++ b/Makefile @@ -61,12 +61,9 @@ test: .govet .golint .gitvalidation .govet: go vet -x ./... -# `go get github.com/golang/lint/golint` -.golint: -ifeq ($(call ALLOWED_GO_VERSION,1.7,$(HOST_GOLANG_VERSION)),true) - @which golint > /dev/null 2>/dev/null || (echo "ERROR: golint not found. Consider 'make install.tools' target" && false) - golint ./... -endif +.lint: + @which golangci-lint > /dev/null 2>/dev/null || (echo "ERROR: golangci-lint not found. Consider 'make install.tools' target" && false) + golangci-lint run # When this is running in GitHub, it will only check the GitHub commit range @@ -78,16 +75,13 @@ else git-validation -v -run DCO,short-subject,dangling-whitespace -range $(EPOCH_TEST_COMMIT)..HEAD endif -install.tools: .install.golint .install.gitvalidation +install.tools: .install.lint .install.gitvalidation -# golint does not even build for