From 7e4a685ed8287609d1a44b9fba59d3d6f3825d2b Mon Sep 17 00:00:00 2001 From: Matias <83959431+mativm02@users.noreply.github.com> Date: Mon, 21 Oct 2024 10:40:05 -0300 Subject: [PATCH 1/5] Upgrading download-artifact and upload-artifact to fix CIs --- .github/workflows/ci-test.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-test.yml b/.github/workflows/ci-test.yml index 584fbc7..4da6695 100644 --- a/.github/workflows/ci-test.yml +++ b/.github/workflows/ci-test.yml @@ -43,7 +43,7 @@ jobs: - name: Run tests run: task run-tests - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: structviewer retention-days: 1 @@ -75,7 +75,7 @@ jobs: if: ${{ contains(fromJSON('["push","pull_request"]'), github.event_name) }} run: | $(go env GOPATH)/bin/golangci-lint run --out-format checkstyle --timeout=300s --max-issues-per-linter=0 --max-same-issues=0 --issues-exit-code=0 --new-from-rev=origin/${{ github.base_ref }} ./... > golanglint.xml - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: golangcilint retention-days: 1 @@ -96,11 +96,11 @@ jobs: with: go-version: ${{ env.GO_VERSION }} - name: Download coverage artifacts - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3 with: name: structviewer - name: Download golangcilint artifacts - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3 with: name: golangcilint - name: Check reports existence From 364fa106541f887f44102699b09ef806955275d0 Mon Sep 17 00:00:00 2001 From: Matias <83959431+mativm02@users.noreply.github.com> Date: Mon, 21 Oct 2024 10:48:41 -0300 Subject: [PATCH 2/5] upgrading version to Go 1.22.6 --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index e670d09..913d1cf 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/TykTechnologies/structviewer -go 1.19 +go 1.22.6 require ( github.com/fatih/structs v1.1.0 From 4242a4bd27f16d96fadc26317e68d0d7c683e439 Mon Sep 17 00:00:00 2001 From: Matias <83959431+mativm02@users.noreply.github.com> Date: Mon, 21 Oct 2024 10:56:37 -0300 Subject: [PATCH 3/5] using go.mod file to get go's version --- .github/workflows/ci-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-test.yml b/.github/workflows/ci-test.yml index 4da6695..2d1edc4 100644 --- a/.github/workflows/ci-test.yml +++ b/.github/workflows/ci-test.yml @@ -18,7 +18,7 @@ jobs: - name: Setup Golang uses: actions/setup-go@v2 with: - go-version: 1.19 + go-version-file: go.mod - name: Verify dependencies run: go mod verify @@ -30,7 +30,7 @@ jobs: run: go vet ./... - name: Install staticcheck - run: go install honnef.co/go/tools/cmd/staticcheck@latest + run: go install honnef.co/go/tools/cmd/staticcheck@ - name: Run staticcheck run: staticcheck ./... From 58bdd692944c1c22b865e3d7af812a708d446980 Mon Sep 17 00:00:00 2001 From: Matias <83959431+mativm02@users.noreply.github.com> Date: Mon, 21 Oct 2024 10:59:02 -0300 Subject: [PATCH 4/5] installing latest version of staticcheck --- .github/workflows/ci-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-test.yml b/.github/workflows/ci-test.yml index 2d1edc4..14227d0 100644 --- a/.github/workflows/ci-test.yml +++ b/.github/workflows/ci-test.yml @@ -30,7 +30,7 @@ jobs: run: go vet ./... - name: Install staticcheck - run: go install honnef.co/go/tools/cmd/staticcheck@ + run: go install honnef.co/go/tools/cmd/staticcheck@latest - name: Run staticcheck run: staticcheck ./... From c6f14224df2429f6f2ebcf46d764f74f50d8fa2d Mon Sep 17 00:00:00 2001 From: Matias <83959431+mativm02@users.noreply.github.com> Date: Mon, 21 Oct 2024 11:14:32 -0300 Subject: [PATCH 5/5] fixing staticcheck --- .github/workflows/ci-test.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-test.yml b/.github/workflows/ci-test.yml index 14227d0..97fee7a 100644 --- a/.github/workflows/ci-test.yml +++ b/.github/workflows/ci-test.yml @@ -30,7 +30,9 @@ jobs: run: go vet ./... - name: Install staticcheck - run: go install honnef.co/go/tools/cmd/staticcheck@latest + run: | + go install honnef.co/go/tools/cmd/staticcheck@latest + echo "$(go env GOPATH)/bin" >> $GITHUB_PATH - name: Run staticcheck run: staticcheck ./...