Compare commits
2 Commits
master
...
circleci/m
Author | SHA1 | Date |
---|---|---|
Adrien Marquès | f13c25c7d3 | |
Adrien Marquès | bd522bde3a |
83
circle.yml
83
circle.yml
|
@ -1,44 +1,51 @@
|
||||||
version: 2
|
version: 2
|
||||||
|
|
||||||
|
shared: &shared
|
||||||
|
environment: # environment variables for the build itself
|
||||||
|
GOPATH: /go
|
||||||
|
TEST_RESULTS: /tmp/test-results
|
||||||
|
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
|
||||||
|
command: go test -v -cover -race -coverprofile=$COVER_PROFILE github.com/xdrm-brackets/nix-amer/... | tee $TEST_RESULTS/out
|
||||||
|
- 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/...
|
||||||
|
|
||||||
|
|
||||||
|
- 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
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build: # runs not using Workflows must have a `build` job as entry point
|
latest:
|
||||||
docker:
|
docker:
|
||||||
- image: circleci/golang
|
- image: circleci/golang
|
||||||
|
<<: *shared
|
||||||
|
- run:
|
||||||
|
name: Update coveralls.io
|
||||||
|
command: /go/bin/goveralls -coverprofile=$COVER_PROFILE -service=circle-ci -repotoken=$COVERALLS_TOKEN
|
||||||
|
|
||||||
environment: # environment variables for the build itself
|
go-1.10:
|
||||||
GOPATH: /go
|
docker:
|
||||||
TEST_RESULTS: /tmp/test-results
|
- image: circleci/golang:1.10
|
||||||
COVER_PROFILE: /tmp/coverage.out
|
<<: *shared
|
||||||
|
|
||||||
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
|
|
||||||
command: go test -v -cover -race -coverprofile=$COVER_PROFILE github.com/xdrm-brackets/nix-amer/... | tee $TEST_RESULTS/out
|
|
||||||
- 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/...
|
|
||||||
- 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
|
|
Loading…
Reference in New Issue