nix-amer/circle.yml

44 lines
1.6 KiB
YAML
Raw Normal View History

2018-11-13 12:10:55 +00:00
version: 2
jobs:
build: # runs not using Workflows must have a `build` job as entry point
docker:
- image: circleci/golang
environment: # environment variables for the build itself
GOPATH: /go
TEST_RESULTS: /tmp/test-results
COVER_PROFILE: /tmp/coverage.out
steps: # steps that comprise the `build` job
- checkout # check out source code to working directory
- run: mkdir -p $TEST_RESULTS # create the test results directory
- restore_cache: # restores saved cache if no changes are detected since last run
keys:
- v1-pkg-cache
- run:
name: Load dependencies
command: go get github.com/mattn/goveralls && go get github.com/go-ini/ini && go get gopkg.in/yaml.v2
- run:
name: Load nix-amer
command: go get github.com/xdrm-brackets/nix-amer
- run:
name: Unit tests
2018-11-16 05:54:02 +00:00
command: go test -v -cover -race -coverprofile=$COVER_PROFILE github.com/xdrm-brackets/nix-amer/... | tee $TEST_RESULTS/out
2018-11-16 05:55:45 +00:00
- run:
name: go fmt
command: go fmt github.com/xdrm-brackets/nix-amer/...
- run:
name: go vet
command: go vet github.com/xdrm-brackets/nix-amer/...
2018-11-13 12:10:55 +00:00
- run:
name: Update coveralls.io
command: /go/bin/goveralls -coverprofile=$COVER_PROFILE -service=circle-ci -repotoken=$COVERALLS_TOKEN
- store_artifacts: # Upload test summary for display in Artifacts
path: /tmp/test-results
destination: raw-test-output
- store_test_results: # Upload test results for display in Test Summary
path: /tmp/test-results