Skip to content

Commit 3719438

Browse files
authored
[build] Add CircleCI config (#112)
* [build] Add CircleCI config * Remove CI jobs for Go 1.6 and below.
1 parent d162037 commit 3719438

File tree

1 file changed

+66
-0
lines changed

1 file changed

+66
-0
lines changed

.circleci/config.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
version: 2.0
2+
3+
jobs:
4+
# Base test configuration for Go library tests Each distinct version should
5+
# inherit this base, and override (at least) the container image used.
6+
"test": &test
7+
docker:
8+
- image: circleci/golang:latest
9+
environment:
10+
GO111MODULE: "on"
11+
working_directory: /go/src/github.com/gorilla/csrf
12+
steps: &steps
13+
- checkout
14+
- run: go version
15+
- run: go get -t -v ./...
16+
- run: diff -u <(echo -n) <(gofmt -d .)
17+
- run: if [[ "$LATEST" = true ]]; then go vet -v ./...; fi
18+
- run: go test -v -race ./...
19+
20+
"latest":
21+
<<: *test
22+
environment:
23+
LATEST: "true"
24+
GO111MODULE: "on"
25+
26+
"1.12":
27+
<<: *test
28+
docker:
29+
- image: circleci/golang:1.12
30+
31+
"1.11":
32+
<<: *test
33+
docker:
34+
- image: circleci/golang:1.11
35+
36+
"1.10":
37+
<<: *test
38+
docker:
39+
- image: circleci/golang:1.10
40+
41+
"1.9":
42+
<<: *test
43+
docker:
44+
- image: circleci/golang:1.9
45+
46+
"1.8":
47+
<<: *test
48+
docker:
49+
- image: circleci/golang:1.8
50+
51+
"1.7":
52+
<<: *test
53+
docker:
54+
- image: circleci/golang:1.7
55+
56+
workflows:
57+
version: 2
58+
build:
59+
jobs:
60+
- "latest"
61+
- "1.12"
62+
- "1.11"
63+
- "1.10"
64+
- "1.9"
65+
- "1.8"
66+
- "1.7"

0 commit comments

Comments
 (0)