forked from hybridgroup/gobot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.yml
68 lines (64 loc) · 2.04 KB
/
config.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Since switch to cimg, the GOPATH has been changed from /go to $HOME/go.
# The latter will expand to the full path of /home/circleci/go.
# On first run, this change may affect caching and some other commands if
# you don’t correct the page in your config.
#
# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/circleci-images
# - image: cimg/postgres:14.5.0
#
# For more information, please read https://github.com/CircleCI-Public/cimg-go/blob/main/README.md
version: 2
jobs:
"test_core_and_drivers_with_coverage":
docker:
- image: cimg/go:1.19
steps:
- checkout
- run:
name: Debug version
command: go version
- run:
name: Core and drivers tests
command: |
go test -v -coverprofile=coverage.txt -covermode=atomic . ./drivers/...
- run:
name: Code coverage
command: |
bash <(curl -s https://codecov.io/bash)
"test_platforms":
docker:
- image: cimg/go:1.19
steps:
- checkout
- run:
name: Debug version
command: go version
- run:
# digispark needs libusb, opencv needs opencv
name: Platform tests (except digispark and opencv)
command: |
go test -v $(go list ./platforms/... | grep -v platforms/digispark | grep -v platforms/opencv)
"check_examples":
docker:
- image: cimg/go:1.19
steps:
- checkout
- run:
name: Debug version
command: go version
- run:
# digispark needs libusb, opencv needs opencv
name: Check examples (except digispark, opencv)
command: |
ALL=$(grep -l -r --include "*.go" 'build example' ./)
SOME=$(grep -L 'digispark' $(grep -L 'gocv' ${ALL}))
for e in ${SOME} ; do go vet "${e}" ; done
workflows:
version: 2
build:
jobs:
- "test_core_and_drivers_with_coverage"
- "test_platforms"
- "check_examples"