2020-11-28 02:26:50 +08:00
|
|
|
|
jobs:
|
|
|
|
|
build:
|
|
|
|
|
docker:
|
2022-09-24 22:14:29 +08:00
|
|
|
|
- image: cimg/go:1.19
|
|
|
|
|
|
|
|
|
|
# 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.
|
2020-11-28 02:26:50 +08:00
|
|
|
|
|
|
|
|
|
# Specify service dependencies here if necessary
|
|
|
|
|
# CircleCI maintains a library of pre-built images
|
2022-09-24 22:14:29 +08:00
|
|
|
|
# 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
|
2020-11-28 02:26:50 +08:00
|
|
|
|
|
|
|
|
|
steps:
|
|
|
|
|
- checkout
|
2022-09-25 16:37:44 +08:00
|
|
|
|
- run:
|
|
|
|
|
name: Debug version
|
|
|
|
|
command: go version
|
2020-12-01 06:10:09 +08:00
|
|
|
|
- run:
|
|
|
|
|
name: Core and drivers tests
|
2022-09-25 16:37:44 +08:00
|
|
|
|
command: go test -v -coverprofile=coverage.txt -covermode=atomic . ./drivers/...
|
2020-12-01 06:10:09 +08:00
|
|
|
|
- run:
|
|
|
|
|
name: Firmata tests
|
2022-09-25 16:37:44 +08:00
|
|
|
|
command: go test -v ./platforms/firmata/...
|
2020-12-01 06:10:09 +08:00
|
|
|
|
- run:
|
|
|
|
|
name: Code coverage
|
|
|
|
|
command: |
|
|
|
|
|
bash <(curl -s https://codecov.io/bash)
|