Skip to content

Commit 67fa649

Browse files
authored
Merge pull request #13 from gobuffalo/github-actions
actions
2 parents 02acb19 + 7e65d78 commit 67fa649

File tree

7 files changed

+42
-75
lines changed

7 files changed

+42
-75
lines changed

.github/FUNDING.yml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# These are supported funding model platforms
2+
3+
github: markbates
4+
patreon: buffalo

.github/workflows/tests.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Tests
2+
on: [push]
3+
jobs:
4+
5+
tests-on:
6+
name: ${{matrix.go-version}} ${{matrix.os}}
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
matrix:
10+
go-version: [1.12.x, 1.13.x]
11+
os: [macos-latest, windows-latest, ubuntu-latest]
12+
steps:
13+
- name: Checkout Code
14+
uses: actions/checkout@v1
15+
with:
16+
fetch-depth: 1
17+
- name: Test
18+
run: |
19+
go mod tidy -v
20+
go test -race ./...
21+
22+

Makefile

+2-61
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,2 @@
1-
TAGS ?= ""
2-
GO_BIN ?= "go"
3-
4-
install:
5-
$(GO_BIN) install -tags ${TAGS} -v .
6-
make tidy
7-
8-
tidy:
9-
ifeq ($(GO111MODULE),on)
10-
$(GO_BIN) mod tidy
11-
else
12-
echo skipping go mod tidy
13-
endif
14-
15-
deps:
16-
$(GO_BIN) get -tags ${TAGS} -t ./...
17-
make tidy
18-
19-
build:
20-
$(GO_BIN) build -v .
21-
make tidy
22-
23-
test:
24-
$(GO_BIN) test -cover -tags ${TAGS} ./...
25-
make tidy
26-
27-
ci-deps:
28-
$(GO_BIN) get -tags ${TAGS} -t ./...
29-
30-
ci-test:
31-
$(GO_BIN) test -tags ${TAGS} -race ./...
32-
33-
lint:
34-
go get github.com/golangci/golangci-lint/cmd/golangci-lint
35-
golangci-lint run --enable-all
36-
make tidy
37-
38-
update:
39-
ifeq ($(GO111MODULE),on)
40-
rm go.*
41-
$(GO_BIN) mod init
42-
$(GO_BIN) mod tidy
43-
else
44-
$(GO_BIN) get -u -tags ${TAGS}
45-
endif
46-
make test
47-
make install
48-
make tidy
49-
50-
release-test:
51-
$(GO_BIN) test -tags ${TAGS} -race ./...
52-
make tidy
53-
54-
release:
55-
$(GO_BIN) get github.com/gobuffalo/release
56-
make tidy
57-
release -y -f version.go --skip-packr
58-
make tidy
59-
60-
61-
1+
test:
2+
go test -cover ./...

go.mod

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
module github.com/gobuffalo/httptest
22

3-
go 1.12
3+
go 1.13
44

55
require (
6-
github.com/davecgh/go-spew v1.1.1 // indirect
7-
github.com/gorilla/sessions v1.1.3
8-
github.com/stretchr/testify v1.3.0
6+
github.com/gorilla/sessions v1.2.0
7+
github.com/stretchr/testify v1.4.0
98
)

go.sum

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
22
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
3-
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
4-
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
5-
github.com/gorilla/context v1.1.1 h1:AWwleXJkX/nhcU9bZSnZoi3h/qGYqQAGhq6zZe/aQW8=
6-
github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg=
73
github.com/gorilla/securecookie v1.1.1 h1:miw7JPhV+b/lAHSXz4qd/nN9jRiAFV5FwjeKyCS8BvQ=
84
github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4=
9-
github.com/gorilla/sessions v1.1.3 h1:uXoZdcdA5XdXF3QzuSlheVRUvjl+1rKY7zBXL68L9RU=
10-
github.com/gorilla/sessions v1.1.3/go.mod h1:8KCfur6+4Mqcc6S0FEfKuN15Vl5MgXW92AE8ovaJD0w=
5+
github.com/gorilla/sessions v1.2.0 h1:S7P+1Hm5V/AT9cjEcUD5uDaQSX0OE577aCXgoaKpYbQ=
6+
github.com/gorilla/sessions v1.2.0/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM=
117
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
128
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
139
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
14-
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
15-
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
10+
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
11+
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
12+
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
13+
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
14+
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
15+
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=

request.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ func (r *Request) perform(req *http.Request) *Response {
6262
req.RequestURI = r.URL
6363
req.Header.Set("Cookie", r.handler.Cookies)
6464
r.handler.ServeHTTP(res, req)
65-
c := res.Result().Header.Get("Set-Cookie")
65+
66+
c := res.Header().Get("Set-Cookie")
6667
r.handler.Cookies = c
6768
return res
6869
}

version.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
package httptest
22

3-
const Version = "v1.4.0"
3+
const Version = ""

0 commit comments

Comments
 (0)