diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index c6710de7e2..3e81619fb5 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -9,9 +9,9 @@ jobs: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v4 - - uses: actions/setup-go@v4 + - uses: actions/setup-go@v5 with: - go-version: "~1.23.6" + go-version-file: "go.mod" - run: go mod download shell: bash - run: ./scripts/build_bench_precompiles.sh diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f0f5a7a888..be3d09996f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,7 +24,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: "~1.23.6" + go-version-file: "go.mod" - name: Set up arm64 cross compiler run: | sudo apt-get -y update diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 479877a8b9..221179561d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -8,9 +8,6 @@ on: - "*" pull_request: -env: - min_go_version: "~1.23.6" - jobs: lint_test: name: Lint @@ -21,7 +18,7 @@ jobs: shell: bash - uses: actions/setup-go@v5 with: - go-version: ${{ env.min_go_version }} + go-version-file: "go.mod" - name: golangci-lint uses: golangci/golangci-lint-action@v3 with: @@ -51,7 +48,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: - go-version: ${{ env.min_go_version }} + go-version-file: "go.mod" - name: Set timeout on Windows # Windows UT run slower and need a longer timeout shell: bash if: matrix.os == 'windows-latest' @@ -85,7 +82,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: ${{ env.min_go_version }} + go-version-file: "go.mod" - name: Use Node.js uses: actions/setup-node@v4 with: @@ -126,7 +123,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: ${{ env.min_go_version }} + go-version-file: "go.mod" - name: Use Node.js uses: actions/setup-node@v4 with: @@ -170,7 +167,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: ${{ env.min_go_version }} + go-version-file: "go.mod" - name: Install AvalancheGo Release shell: bash run: BASEDIR=/tmp/e2e-test AVALANCHEGO_BUILD_PATH=/tmp/e2e-test/avalanchego ./scripts/install_avalanchego_release.sh @@ -205,7 +202,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: - go-version: ${{ env.min_go_version }} + go-version-file: "go.mod" - name: Install AvalancheGo Release shell: bash run: BASEDIR=/tmp/e2e-test AVALANCHEGO_BUILD_PATH=/tmp/e2e-test/avalanchego ./scripts/install_avalanchego_release.sh diff --git a/scripts/lint.sh b/scripts/lint.sh deleted file mode 100755 index acd5b324fc..0000000000 --- a/scripts/lint.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env bash - -set -o errexit -set -o nounset -set -o pipefail - -# Upstream is compatible with v1.63.x at time of this writing, and -# checking for this specific version is an attempt to avoid skew -# between local and CI execution. -KNOWN_GOOD_VERSION="v1.63" -VERSION="$(golangci-lint --version | sed -e 's+golangci-lint has version \(v1.*\)\..* built.*+\1+')" -if [[ "${VERSION}" != "${KNOWN_GOOD_VERSION}" ]]; then - echo "expected golangci-lint ${KNOWN_GOOD_VERSION}, but ${VERSION} was used" - echo "${KNOWN_GOOD_VERSION} is used in CI and should be used locally to ensure compatible results" - echo "installation command: go install github.com/golangci/golangci-lint/cmd/golangci-lint@${KNOWN_GOOD_VERSION}" - exit 255 -fi - -golangci-lint run --path-prefix=. --timeout 3m