Skip to content

Instantly share code, notes, and snippets.

@henrikbjorn
Created September 7, 2019 20:01
Show Gist options
  • Select an option

  • Save henrikbjorn/2f7926296c3864ac8488a6f71c6add4c to your computer and use it in GitHub Desktop.

Select an option

Save henrikbjorn/2f7926296c3864ac8488a6f71c6add4c to your computer and use it in GitHub Desktop.

Revisions

  1. henrikbjorn created this gist Sep 7, 2019.
    35 changes: 35 additions & 0 deletions config.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,35 @@
    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