Skip to content

Instantly share code, notes, and snippets.

@henrikbjorn
Created September 7, 2019 20:01
Show Gist options
  • Save henrikbjorn/2f7926296c3864ac8488a6f71c6add4c to your computer and use it in GitHub Desktop.
Save henrikbjorn/2f7926296c3864ac8488a6f71c6add4c to your computer and use it in GitHub Desktop.
version: 2.1
jobs:
build:
docker:
- image: circleci/golang:1.13
steps:
- checkout
- restore_cache:
keys:
- go-mod-v1-{{ checksum "go.sum" }}
- install-modules
- save_cache:
key: go-mod-v1-{{ checksum "go.sum" }}
paths:
- "/go/pkg/mod"
- setup-junit
- run-tests
- store_test_results:
path: ~/junit
- store_artifacts:
path: ~/junit
commands:
install-modules:
steps:
- run: go mod download
setup-junit:
steps:
- run: mkdir ~/junit
run-tests:
steps:
- run: gotestsum --junitfile ~/junit/unit-tests.xml --format short-verbose
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment