From fc3aa7f18149f68ecd4c9f37cde81d06b9d01096 Mon Sep 17 00:00:00 2001 From: Anna Shaleva Date: Mon, 8 Aug 2022 13:42:49 +0300 Subject: [PATCH] ci: update workflows' go version --- .circleci/config.yml | 44 ++++++++++++++++----------------- .github/workflows/build.yml | 7 ++---- .github/workflows/run_tests.yml | 17 ++++++------- Dockerfile.wsc | 6 ++--- 4 files changed, 33 insertions(+), 41 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 015be1fc3..d59e6f2e7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,17 +1,15 @@ version: 2.1 executors: - go1_16: - docker: - - image: cimg/go:1.16 - environment: - GO111MODULE: "on" go1_17: docker: - image: cimg/go:1.17 go1_18: docker: - image: cimg/go:1.18 + go1_19: + docker: + - image: cimg/go:1.19 commands: gomod: @@ -39,18 +37,6 @@ jobs: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.44.2 make lint - test_1_16: - working_directory: /home/circleci/go/src/github.com/nspcc-dev/neo-go - executor: go1_16 - steps: - - checkout - - run: git submodule sync - - run: git submodule update --init - - gomod - - run: - command: go test -v -race ./... - no_output_timeout: 15m - test_1_17: working_directory: /home/circleci/go/src/github.com/nspcc-dev/neo-go executor: go1_17 @@ -75,9 +61,21 @@ jobs: command: go test -v -race ./... no_output_timeout: 15m + test_1_19: + working_directory: /home/circleci/go/src/github.com/nspcc-dev/neo-go + executor: go1_19 + steps: + - checkout + - run: git submodule sync + - run: git submodule update --init + - gomod + - run: + command: go test -v -race ./... + no_output_timeout: 15m + build_cli: working_directory: /home/circleci/go/src/github.com/nspcc-dev/neo-go - executor: go1_18 + executor: go1_19 steps: - checkout - gomod @@ -88,7 +86,7 @@ jobs: build_image: working_directory: /home/circleci/go/src/github.com/nspcc-dev/neo-go - executor: go1_18 + executor: go1_19 docker: - image: golang:1-alpine steps: @@ -116,10 +114,6 @@ workflows: filters: tags: only: v/[0-9]+\.[0-9]+\.[0-9]+/ - - test_1_16: - filters: - tags: - only: v/[0-9]+\.[0-9]+\.[0-9]+/ - test_1_17: filters: tags: @@ -128,6 +122,10 @@ workflows: filters: tags: only: v/[0-9]+\.[0-9]+\.[0-9]+/ + - test_1_19: + filters: + tags: + only: v/[0-9]+\.[0-9]+\.[0-9]+/ - build_cli: filters: tags: diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c1cc64698..ba0becb67 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -31,9 +31,6 @@ on: required: false default: 'false' -env: - GO111MODULE: "on" - jobs: build_cli: name: Build CLI @@ -56,7 +53,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v3 with: - go-version: 1.18 + go-version: 1.19 cache: true - name: Update Go modules @@ -133,7 +130,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v3 with: - go-version: 1.18 + go-version: 1.19 cache: true - name: Login to DockerHub diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index adef34a96..dcf4f79e3 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -12,9 +12,6 @@ on: - '**/*.md' workflow_dispatch: -env: - GO111MODULE: "on" - jobs: lint: name: Lint @@ -103,7 +100,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v3 with: - go-version: 1.18 + go-version: 1.19 cache: true - name: Update Go modules @@ -125,20 +122,20 @@ jobs: strategy: matrix: os: [ubuntu-20.04, windows-2022, macos-12] - go_versions: [ '1.16', '1.17', '1.18' ] + go_versions: [ '1.17', '1.18', '1.19' ] exclude: # Only latest Go version for Windows and MacOS. - os: windows-2022 - go_versions: '1.16' + go_versions: '1.17' - os: windows-2022 - go_versions: '1.17' - - os: macos-12 - go_versions: '1.16' + go_versions: '1.18' - os: macos-12 go_versions: '1.17' + - os: macos-12 + go_versions: '1.18' # Exclude latest Go version for Ubuntu as Coverage uses it. - os: ubuntu-20.04 - go_versions: '1.18' + go_versions: '1.19' fail-fast: false steps: - uses: actions/checkout@v3 diff --git a/Dockerfile.wsc b/Dockerfile.wsc index 4ea7887f9..7eef193c3 100644 --- a/Dockerfile.wsc +++ b/Dockerfile.wsc @@ -43,14 +43,14 @@ RUN $newPath = ('{0}\bin;C:\Program Files\Go\bin;{1}' -f $env:GOPATH, $env:PATH) [Environment]::SetEnvironmentVariable('PATH', $newPath, [EnvironmentVariableTarget]::Machine); # Keep go version in sync with Build GA job. -ENV GOLANG_VERSION=1.18 +ENV GOLANG_VERSION=1.19 -RUN $url = 'https://dl.google.com/go/go1.18.windows-amd64.zip'; \ +RUN $url = 'https://go.dev/dl/go1.19.windows-amd64.zip'; \ Write-Host ('Downloading {0} ...' -f $url); \ [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ Invoke-WebRequest -Uri $url -OutFile 'go.zip'; \ \ - $sha256 = '65c5c0c709a7ca1b357091b10b795b439d8b50e579d3893edab4c7e9b384f435'; \ + $sha256 = 'bcaaf966f91980d35ae93c37a8fe890e4ddfca19448c0d9f66c027d287e2823a'; \ Write-Host ('Verifying sha256 ({0}) ...' -f $sha256); \ if ((Get-FileHash go.zip -Algorithm sha256).Hash -ne $sha256) { \ Write-Host 'FAILED!'; \