gobot.io/x/gobot/v2@v2.1.0/.circleci/config.yml (about) 1 # Since switch to cimg, the GOPATH has been changed from /go to $HOME/go. 2 # The latter will expand to the full path of /home/circleci/go. 3 # On first run, this change may affect caching and some other commands if 4 # you don’t correct the page in your config. 5 # 6 # Specify service dependencies here if necessary 7 # CircleCI maintains a library of pre-built images 8 # documented at https://circleci.com/docs/circleci-images 9 # - image: cimg/postgres:14.5.0 10 # 11 # For more information, please read https://github.com/CircleCI-Public/cimg-go/blob/main/README.md 12 13 version: 2 14 jobs: 15 "test_core_and_drivers_with_coverage": 16 docker: 17 - image: cimg/go:1.17 18 steps: 19 - checkout 20 - run: 21 name: Debug version 22 command: go version 23 - run: 24 name: Core and drivers tests 25 command: | 26 go test -v -coverprofile=coverage.txt -covermode=atomic . ./drivers/... 27 - run: 28 name: Code coverage 29 command: | 30 bash <(curl -s https://codecov.io/bash) 31 32 "test_platforms": 33 docker: 34 - image: cimg/go:1.17 35 steps: 36 - checkout 37 - run: 38 name: Debug version 39 command: go version 40 - run: 41 # digispark needs libusb, joystick needs sdl2, opencv needs opencv 42 name: Platform tests (except digispark, joystick, opencv) 43 command: | 44 go test -v $(go list ./platforms/... | grep -v platforms/digispark | grep -v platforms/joystick | grep -v platforms/opencv) 45 46 "check_examples": 47 docker: 48 - image: cimg/go:1.17 49 steps: 50 - checkout 51 - run: 52 name: Debug version 53 command: go version 54 - run: 55 # digispark needs libusb, joystick needs sdl2, opencv needs opencv 56 name: Check examples (except digispark, joystick, opencv) 57 command: | 58 ALL=$(grep -l -r --include "*.go" 'build example' ./) 59 SOME=$(grep -L 'digispark' $(grep -L 'joystick' $(grep -L 'gocv' ${ALL}))) 60 for e in ${SOME} ; do go vet "${e}" ; done 61 62 workflows: 63 version: 2 64 build: 65 jobs: 66 - "test_core_and_drivers_with_coverage" 67 - "test_platforms" 68 - "check_examples"