forked from open-telemetry/opentelemetry-go-contrib
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build both go-1.13 and go-1.14 in circleci (#569)
This PR changes the circleci build config to build the project in both go-1.13 and go-1.14 versions. Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com> Co-authored-by: Liz Fong-Jones <lizf@honeycomb.io>
- Loading branch information
1 parent
c97b4f7
commit e458809
Showing
1 changed file
with
46 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,54 @@ | ||
version: 2 | ||
jobs: | ||
build: | ||
version: 2.1 | ||
executors: | ||
current-go: | ||
docker: | ||
- image: circleci/golang:1.14 | ||
- image: cimg/go:1.14 | ||
prior-go: | ||
docker: | ||
- image: cimg/go:1.13 | ||
|
||
build-template: &build-template | ||
environment: | ||
TEST_RESULTS: /tmp/test-results # path to where test results will be saved | ||
|
||
environment: | ||
TEST_RESULTS: /tmp/test-results # path to where test results will be saved | ||
steps: | ||
- checkout | ||
- run: mkdir -p $TEST_RESULTS # create the test results directory | ||
|
||
steps: | ||
- checkout | ||
- run: mkdir -p $TEST_RESULTS # create the test results directory | ||
- restore_cache: # restores saved cache if no changes are detected since last run | ||
keys: | ||
- cimg-go-pkg-mod-{{ checksum "go.sum" }} | ||
|
||
- restore_cache: # restores saved cache if no changes are detected since last run | ||
keys: | ||
- go-pkg-mod-{{ checksum "go.sum" }} | ||
- run: | ||
name: "Precommit and Coverage Report" | ||
command: | | ||
make ci | ||
mv coverage.html $TEST_RESULTS/ | ||
- run: | ||
name: "Precommit and Coverage Report" | ||
command: | | ||
make ci | ||
mv coverage.html $TEST_RESULTS/ | ||
- save_cache: | ||
key: cimg-go-pkg-mod-{{ checksum "go.sum" }} | ||
paths: | ||
- "/home/circleci/go/pkg/mod" | ||
|
||
- save_cache: | ||
key: go-pkg-mod-{{ checksum "go.sum" }} | ||
paths: | ||
- "/go/pkg/mod" | ||
- store_artifacts: | ||
path: /tmp/test-results | ||
destination: opentelemetry-go-test-output | ||
|
||
- store_artifacts: | ||
path: /tmp/test-results | ||
destination: opentelemetry-go-test-output | ||
- store_test_results: | ||
path: /tmp/test-results | ||
|
||
- store_test_results: | ||
path: /tmp/test-results | ||
jobs: | ||
current-go: | ||
executor: current-go | ||
<<: *build-template | ||
|
||
prior-go: | ||
executor: prior-go | ||
<<: *build-template | ||
|
||
workflows: | ||
version: 2 | ||
build: | ||
jobs: | ||
- current-go | ||
- prior-go |