2019-07-03 01:21:24 +02:00
|
|
|
version: 2
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
docker:
|
2019-10-29 17:45:48 +02:00
|
|
|
- image: circleci/golang:1.13.3
|
2019-07-03 01:21:24 +02:00
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
- restore_cache: # restores saved cache if no changes are detected since last run
|
|
|
|
keys:
|
|
|
|
- v1-pkg-{{ checksum "go.sum" }}
|
|
|
|
|
|
|
|
- run:
|
|
|
|
name: "Precommit and Coverage Report"
|
|
|
|
command: |
|
|
|
|
make circle-ci
|
|
|
|
mv coverage.html $TEST_RESULTS/
|
|
|
|
|
|
|
|
- save_cache:
|
|
|
|
key: v1-pkg-{{ checksum "go.sum" }}
|
|
|
|
paths:
|
|
|
|
- "~/go/pkg/mod"
|
|
|
|
|
|
|
|
- store_artifacts:
|
|
|
|
path: /tmp/test-results
|
|
|
|
destination: opentelemetry-go-test-output
|
|
|
|
|
|
|
|
- store_test_results:
|
|
|
|
path: /tmp/test-results
|