check examples in CI (#884)

This commit is contained in:
Thomas Kohler 2022-11-13 19:25:17 +01:00 committed by GitHub
parent 34f7e77561
commit ae2d0a6e27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 18 additions and 1 deletions

View File

@ -41,9 +41,26 @@ jobs:
name: Platform tests (except digispark, joystick, opencv)
command: go test -v $(go list ./platforms/... | grep -v platforms/digispark | grep -v platforms/joystick | grep -v platforms/opencv)
"check_examples":
docker:
- image: cimg/go:1.17
steps:
- checkout
- run:
name: Debug version
command: go version
- run:
# digispark needs libusb, joystick needs sdl2, opencv needs opencv
name: Check examples (except digispark, joystick, opencv)
command: |
ALL=$(grep -l -r --include "*.go" 'build example' ./)
SOME=$(grep -L 'digispark' $(grep -L 'joystick' $(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"