Skip to content

Commit

Permalink
use last two stable Go versions
Browse files Browse the repository at this point in the history
  • Loading branch information
kmoe committed Sep 2, 2021
1 parent 779ef49 commit 7ffc581
Showing 1 changed file with 60 additions and 94 deletions.
154 changes: 60 additions & 94 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ commands:
win_install_go:
steps:
- run:
command: choco install golang --version 1.16.4 --yes
command: choco install golang --version 1.17 --yes
- run:
command: go version
macos_install_go:
Expand Down Expand Up @@ -61,22 +61,16 @@ jobs:
- go_unit_test
- go_e2e_test

go113_build:
docker:
- image: circleci/golang:1.13
steps:
- checkout
- go_build

go114_build:
# previous stable Go version
go116_build:
docker:
- image: circleci/golang:1.14
- image: circleci/golang:1.16
steps:
- checkout
- go_build
go114_test:
go116_test:
docker:
- image: circleci/golang:1.14
- image: circleci/golang:1.16
parameters:
test_results:
type: string
Expand All @@ -85,27 +79,28 @@ jobs:
- checkout
- go_unit_test

go115_build:
# latest stable Go version
go117_build:
docker:
- image: circleci/golang:1.15
- image: circleci/golang:1.17
steps:
- checkout
- go_build
go115_test:
go117_test:
docker:
- image: circleci/golang:1.15
- image: circleci/golang:1.17
parameters:
test_results:
type: string
default: /tmp/test-results
steps:
- checkout
- go_unit_test
go116_test_main:
go117_test_main:
environment:
TFEXEC_E2ETEST_VERSIONS: refs/heads/main
docker:
- image: circleci/golang:1.16
- image: circleci/golang:1.17
parameters:
test_results:
type: string
Expand All @@ -114,61 +109,52 @@ jobs:
- checkout
- go_unit_test
- go_e2e_test
go115_vet:
go117_vet:
docker:
- image: circleci/golang:1.15
- image: circleci/golang:1.17
steps:
- checkout
- run: go vet ./...
go115_fmt:
go117_fmt:
docker:
- image: circleci/golang:1.15
- image: circleci/golang:1.17
steps:
- checkout
- run: gofmt -s -l .
go115_release:
go117_release:
docker:
- image: circleci/golang:1.15
- image: circleci/golang:1.17
steps:
- add_ssh_keys:
fingerprints:
- db:cf:97:b8:d6:ac:86:74:96:e1:54:e4:bc:27:2b:d0
- checkout
- run: ./scripts/release/release.sh
go116_build:
docker:
- image: circleci/golang:1.16
steps:
- checkout
- go_build

workflows:
version: 2
pr:
jobs:
- winbuildtest
- macosbuildtest

# build only for these versions
- go113_build

- go114_build
- go114_test:
- go116_build
- go116_test:
requires:
- go114_build

- go115_build
- go115_test:
- go116_build
- go117_build
- go117_test:
requires:
- go115_build
- go116_test_main:
- go117_build
- go117_test_main:
requires:
- go115_build
- go115_vet:
- go117_build
- go117_vet:
requires:
- go115_build
- go115_fmt:
- go117_build
- go117_fmt:
requires:
- go115_build
- go117_build
release:
jobs:
- winbuildtest:
Expand All @@ -181,85 +167,71 @@ workflows:
branches:
only:
- main

# build only for these versions
- go113_build:
filters:
branches:
only:
- main

- go114_build:
- go116_build:
filters:
branches:
only:
- main
- go114_test:
- go116_test:
requires:
- go114_build
- go116_build
filters:
branches:
only:
- main

- go115_build:
- go117_build:
filters:
branches:
only:
- main
- go115_test:
- go117_test:
requires:
- go115_build
- go117_build
filters:
branches:
only:
- main
- go116_test_main:

- go117_test_main:
requires:
- go116_build
- go117_build
filters:
branches:
only:
- main
- go115_vet:
- go117_vet:
requires:
- go115_build
- go117_build
filters:
branches:
only:
- main
- go115_fmt:
- go117_fmt:
requires:
- go115_build
filters:
branches:
only:
- main
- go116_build:
- go117_build
filters:
branches:
only:
- main

- trigger-release:
filters:
branches:
only:
- main
type: approval

- go115_release:
- go117_release:
filters:
branches:
only:
- main
requires:
- trigger-release
- go113_build
- go114_test
- go115_test
- go116_test_main
- go115_vet
- go115_fmt
- go117_test_main
- go117_vet
- go117_fmt
- winbuildtest
- macosbuildtest
nightly:
Expand All @@ -277,36 +249,31 @@ workflows:
- slack/notify:
event: fail
template: basic_fail_1
- go113_build:
post-steps:
- slack/notify:
event: fail
template: basic_fail_1
- go114_build:
- go116_build:
post-steps:
- slack/notify:
event: fail
template: basic_fail_1
- go114_test:
- go116_test:
post-steps:
- slack/notify:
event: fail
template: basic_fail_1
requires:
- go114_build
- go115_build:
- go116_build
- go117_build:
post-steps:
- slack/notify:
event: fail
template: basic_fail_1
- go115_test:
- go117_test:
post-steps:
- slack/notify:
event: fail
template: basic_fail_1
requires:
- go115_build
- go116_test_main:
- go117_build
- go117_test_main:
post-steps:
- slack/notify:
event: fail
Expand All @@ -329,9 +296,8 @@ workflows:
]
}
requires:
- go115_build
- go115_test
- go114_test
- go113_build
- go116_build
- go116_test
- go117_build
- winbuildtest
- macosbuildtest

0 comments on commit 7ffc581

Please sign in to comment.