File tree 3 files changed +59
-14
lines changed
3 files changed +59
-14
lines changed Original file line number Diff line number Diff line change
1
+ version : 2.1
2
+
3
+ references :
4
+ images :
5
+ go : &GOLANG_IMAGE circleci/golang:latest
6
+ environments :
7
+ tmp : &TEST_RESULTS_PATH /tmp/test-results # path to where test results are saved
8
+
9
+ # reusable 'executor' object for jobs
10
+ executors :
11
+ go :
12
+ docker :
13
+ - image : *GOLANG_IMAGE
14
+ environment :
15
+ - TEST_RESULTS : *TEST_RESULTS_PATH
16
+
17
+ jobs :
18
+ go-test :
19
+ executor : go
20
+ steps :
21
+ - checkout
22
+ - run : mkdir -p $TEST_RESULTS
23
+
24
+ - restore_cache : # restore cache from dev-build job
25
+ keys :
26
+ - go-version-modcache-v1-{{ checksum "go.mod" }}
27
+
28
+ # Save go module cache if the go.mod file has changed
29
+ - save_cache :
30
+ key : go-version-modcache-v1-{{ checksum "go.mod" }}
31
+ paths :
32
+ - " /go/pkg/mod"
33
+
34
+ # check go fmt output because it does not report non-zero when there are fmt changes
35
+ - run :
36
+ name : check go fmt
37
+ command : |
38
+ files=$(go fmt ./...)
39
+ if [ -n "$files" ]; then
40
+ echo "The following file(s) do not conform to go fmt:"
41
+ echo "$files"
42
+ exit 1
43
+ fi
44
+
45
+ # run go tests with gotestsum
46
+ - run : |
47
+ PACKAGE_NAMES=$(go list ./...)
48
+ gotestsum --format=short-verbose --junitfile $TEST_RESULTS/gotestsum-report.xml -- $PACKAGE_NAMES
49
+ - store_test_results :
50
+ path : *TEST_RESULTS_PATH
51
+ - store_artifacts :
52
+ path : *TEST_RESULTS_PATH
53
+
54
+ workflows :
55
+ version : 2
56
+ test-and-build :
57
+ jobs :
58
+ - go-test
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
# Versioning Library for Go
2
- [ ![ Build Status] ( https://travis-ci.org/ hashicorp/go-version.svg?branch=master )] ( https://travis-ci.org/ hashicorp/go-version )
2
+ [ ![ Build Status] ( https://circleci.com/gh/ hashicorp/go-version/tree/master .svg?style=svg )] ( https://circleci.com/gh/ hashicorp/go-version/tree/master )
3
3
4
4
go-version is a library for parsing versions and version constraints,
5
5
and verifying versions against a set of constraints. go-version
You can’t perform that action at this time.
0 commit comments