-
Notifications
You must be signed in to change notification settings - Fork 77
/
circle.yml
46 lines (37 loc) · 1.24 KB
/
circle.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
version: 2
jobs:
build:
docker:
- image: turbinelabs/build-common:0.10.2.0
working_directory: "/go/src/github.com/turbinelabs/rotor"
environment:
- PROJECT: github.com/turbinelabs/rotor
- TEST_RUNNER_OUTPUT: /tmp/test-results/testrunner
- GO_TEST_RUNNER: "-exec testrunner"
- GO_TEST_TIMEOUT: 10s
steps:
- checkout
- run: env | sort
- run:
name: install deps
command: go get $PROJECT/...
- run:
name: install testrunner
command: |
go get github.com/turbinelabs/test/testrunner
go install github.com/turbinelabs/test/testrunner
- run:
name: run tests
command: |
go test $GO_TEST_RUNNER $PROJECT/... -timeout $GO_TEST_TIMEOUT -covermode=count -coverprofile coverage_with_mocks.txt
cat coverage_with_mocks.txt | grep -v "/mock_" >> coverage.txt
- run:
name: upload test coverage
command: |
if curl --silent --fail https://codecov.io/bash >codecov.sh; then
bash <codecov.sh
else
echo skipping codecov -- script download error
fi
- store_test_results:
path: /tmp/test-results