Skip to content

Commit ae1634f

Browse files
authored
Create CircleCI config.yml (#519)
* Create config.yml * Delete .travis.yml * Added CircleCI badge to README * Add golint; run on latest only
1 parent 80c2d40 commit ae1634f

File tree

4 files changed

+80
-23
lines changed

4 files changed

+80
-23
lines changed

.circleci/config.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
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+
working_directory: /go/src/github.com/gorilla/websocket
10+
steps: &steps
11+
- checkout
12+
- run: go version
13+
- run: go get -t -v ./...
14+
# Only run gofmt, vet & lint against the latest Go version
15+
- run: >
16+
if [[ "$LATEST" = true ]]; then
17+
go get -u golang.org/x/lint/golint
18+
golint ./...
19+
fi
20+
- run: >
21+
if [[ "$LATEST" = true ]]; then
22+
diff -u <(echo -n) <(gofmt -d .)
23+
fi
24+
- run: >
25+
if [[ "$LATEST" = true ]]; then
26+
go vet -v .
27+
fi
28+
- run: if [[ "$LATEST" = true ]]; then go vet -v .; fi
29+
- run: go test -v -race ./...
30+
31+
"latest":
32+
<<: *test
33+
environment:
34+
LATEST: true
35+
36+
"1.12":
37+
<<: *test
38+
docker:
39+
- image: circleci/golang:1.12
40+
41+
"1.11":
42+
<<: *test
43+
docker:
44+
- image: circleci/golang:1.11
45+
46+
"1.10":
47+
<<: *test
48+
docker:
49+
- image: circleci/golang:1.10
50+
51+
"1.9":
52+
<<: *test
53+
docker:
54+
- image: circleci/golang:1.9
55+
56+
"1.8":
57+
<<: *test
58+
docker:
59+
- image: circleci/golang:1.8
60+
61+
"1.7":
62+
<<: *test
63+
docker:
64+
- image: circleci/golang:1.7
65+
66+
workflows:
67+
version: 2
68+
build:
69+
jobs:
70+
- "latest"
71+
- "1.12"
72+
- "1.11"
73+
- "1.10"
74+
- "1.9"
75+
- "1.8"
76+
- "1.7"

.travis.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Gorilla WebSocket
22

3+
[![GoDoc](https://godoc.org/github.com/gorilla/websocket?status.svg)](https://godoc.org/github.com/gorilla/websocket)
4+
[![CircleCI](https://circleci.com/gh/gorilla/websocket.svg?style=svg)](https://circleci.com/gh/gorilla/websocket)
5+
36
Gorilla WebSocket is a [Go](http://golang.org/) implementation of the
47
[WebSocket](http://www.rfc-editor.org/rfc/rfc6455.txt) protocol.
58

6-
[![Build Status](https://travis-ci.org/gorilla/websocket.svg?branch=master)](https://travis-ci.org/gorilla/websocket)
7-
[![GoDoc](https://godoc.org/github.com/gorilla/websocket?status.svg)](https://godoc.org/github.com/gorilla/websocket)
8-
99
### Documentation
1010

1111
* [API Reference](http://godoc.org/github.com/gorilla/websocket)

conn_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ func TestWriteBufferPoolSync(t *testing.T) {
297297
// errorWriter is an io.Writer than returns an error on all writes.
298298
type errorWriter struct{}
299299

300-
func (ew errorWriter) Write(p []byte) (int, error) { return 0, errors.New("Error!") }
300+
func (ew errorWriter) Write(p []byte) (int, error) { return 0, errors.New("error") }
301301

302302
// TestWriteBufferPoolError ensures that buffer is returned to pool after error
303303
// on write.

0 commit comments

Comments
 (0)