From 2585713f31a1e1147fc0770d0dbbae69ec2f234b Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Wed, 25 Aug 2021 22:21:45 +0300 Subject: [PATCH] *: use Go 1.17 by default, test with 1.15, 1.16 and 1.17 --- .circleci/config.yml | 25 ++++++++++++++++++---- .github/workflows/publish_to_dockerhub.yml | 4 ++-- .github/workflows/run_tests.yml | 6 +++--- 3 files changed, 26 insertions(+), 9 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index caf6dd56d..c025f694b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -13,6 +13,9 @@ executors: - image: circleci/golang:1.16 environment: GO111MODULE: "on" + go1_17: + docker: + - image: circleci/golang:1.17 commands: gomod: @@ -29,7 +32,7 @@ commands: jobs: lint: working_directory: /go/src/github.com/nspcc-dev/neo-go - executor: go1_16 + executor: go1_17 steps: - checkout - gomod @@ -49,9 +52,19 @@ jobs: - gomod - run: go test -v -race ./... - test_cover: + test_1_16: working_directory: /go/src/github.com/nspcc-dev/neo-go executor: go1_16 + steps: + - checkout + - run: git submodule sync + - run: git submodule update --init + - gomod + - run: go test -v -race ./... + + test_cover: + working_directory: /go/src/github.com/nspcc-dev/neo-go + executor: go1_17 environment: CGO_ENABLED: 0 steps: @@ -65,7 +78,7 @@ jobs: build_cli: working_directory: /go/src/github.com/nspcc-dev/neo-go - executor: go1_16 + executor: go1_17 steps: - checkout - gomod @@ -76,7 +89,7 @@ jobs: build_image: working_directory: /go/src/github.com/nspcc-dev/neo-go - executor: go1_16 + executor: go1_17 docker: - image: golang:1-alpine steps: @@ -108,6 +121,10 @@ 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_cover: filters: tags: diff --git a/.github/workflows/publish_to_dockerhub.yml b/.github/workflows/publish_to_dockerhub.yml index b7ea9ea94..b3db4dad7 100644 --- a/.github/workflows/publish_to_dockerhub.yml +++ b/.github/workflows/publish_to_dockerhub.yml @@ -57,7 +57,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.16 + go-version: 1.17 - name: Restore go modules from cache uses: actions/cache@v2 @@ -94,7 +94,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.16 + go-version: 1.17 - name: Restore go modules from cache uses: actions/cache@v2 diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index ea83072fc..f77f0541a 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -44,7 +44,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.16 + go-version: 1.17 - name: Restore Go modules from cache uses: actions/cache@v2 @@ -111,7 +111,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.16 + go-version: 1.17 - name: Restore Go modules from cache uses: actions/cache@v2 @@ -138,7 +138,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.16 + go-version: 1.17 - name: Restore Go modules from cache uses: actions/cache@v2