Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/angshumanHalder/httpexpect
Browse files Browse the repository at this point in the history
…into 191-migrate-from-float64-to-big.Float
  • Loading branch information
angshumanHalder committed Jan 20, 2024
2 parents ca0e087 + d0cfaf9 commit af44eb7
Show file tree
Hide file tree
Showing 49 changed files with 3,586 additions and 986 deletions.
34 changes: 22 additions & 12 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
name: build

on:
workflow_dispatch:

pull_request:
branches:
- master
- v*

push:
branches:
- master
Expand All @@ -15,21 +16,22 @@ on:

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
go: [1.17, 1.x]
go: [1.19, 1.x]
os: [ubuntu-latest, windows-latest, macos-latest]

name: Go ${{ matrix.go }}
runs-on: ${{ matrix.os }}
name: Go ${{ matrix.go }} ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install Go
uses: actions/setup-go@v3
uses: actions/setup-go@v4.0.1
with:
go-version: ${{ matrix.go }}
cache: true

- name: Build
run: go get -v ./...
Expand All @@ -38,17 +40,21 @@ jobs:
run: go test ./...

examples:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]

name: Examples
runs-on: ${{ matrix.os }}
name: Examples ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install Go
uses: actions/setup-go@v3
uses: actions/setup-go@v4.0.1
with:
go-version: 1.x
cache: true

- name: Build
run: cd _examples && go get -v .
Expand Down Expand Up @@ -104,15 +110,18 @@ jobs:
uses: actions/checkout@v3

- name: Install Go
uses: actions/setup-go@v3
uses: actions/setup-go@v4.0.1
with:
go-version: 1.x
cache: false

- name: Run linters
uses: golangci/golangci-lint-action@v3
timeout-minutes: 20
with:
version: v1.51.2
version: v1.54.2
working-directory: ${{ matrix.dir }}
args: --timeout=20m

coverage:
runs-on: ubuntu-latest
Expand All @@ -124,9 +133,10 @@ jobs:
uses: actions/checkout@v3

- name: Install Go
uses: actions/setup-go@v3
uses: actions/setup-go@v4.0.1
with:
go-version: 1.x
cache: true

- name: Run tests
run: go test -covermode=count -coverprofile=coverage.out -coverpkg=. ./...
Expand Down
4 changes: 4 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ linters:
linters-settings:
lll:
line-length: 90
revive:
rules:
- name: unused-parameter
disabled: true

issues:
exclude-rules:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ all: tidy gen build lint test spell
tidy:
go mod tidy -v
cd _examples && go get -v -u github.com/gavv/httpexpect/v2
cd _examples && go mod tidy -v
cd _examples && go mod tidy -v -compat=1.17

gen:
go generate ./...
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Workflow:
* Failures are reported using [`testify`](https://github.com/stretchr/testify/) (`assert` or `require` package) or standard `testing` package.
* JSON values are pretty-printed using `encoding/json`, Go values are pretty-printed using [`litter`](https://github.com/sanity-io/litter).
* Dumping requests and responses in various formats, using [`httputil`](https://golang.org/pkg/net/http/httputil/), [`http2curl`](https://github.com/moul/http2curl), or simple compact logger.
* Color support using [`fatih/color`](github.com/fatih/color).
* Color support using [`fatih/color`](https://github.com/fatih/color).

##### Tuning

Expand Down Expand Up @@ -359,12 +359,12 @@ m := e.GET("/users/john").
Expect().
Header("Location").Match("http://(?P<host>.+)/users/(?P<user>.+)")

m.Index(0).IsEqual("http://example.com/users/john")
m.Index(1).IsEqual("example.com")
m.Index(2).IsEqual("john")
m.Submatch(0).IsEqual("http://example.com/users/john")
m.Submatch(1).IsEqual("example.com")
m.Submatch(2).IsEqual("john")

m.Name("host").IsEqual("example.com")
m.Name("user").IsEqual("john")
m.NamedSubmatch("host").IsEqual("example.com")
m.NamedSubmatch("user").IsEqual("john")
```

##### Redirection support
Expand Down
74 changes: 44 additions & 30 deletions _examples/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,70 +5,80 @@ go 1.17
require (
github.com/dgrijalva/jwt-go v3.2.0+incompatible
github.com/fasthttp/websocket v1.5.0
github.com/gavv/httpexpect/v2 v2.15.0
github.com/gin-gonic/gin v1.8.1
github.com/gavv/httpexpect/v2 v2.16.0
github.com/gin-gonic/gin v1.9.1
github.com/go-oauth2/oauth2/v4 v4.5.1
github.com/gorilla/websocket v1.5.0
github.com/kataras/iris/v12 v12.1.8
github.com/kataras/iris/v12 v12.2.0
github.com/labstack/echo/v4 v4.10.0
github.com/valyala/fasthttp v1.45.0
github.com/valyala/fasthttp v1.50.0
golang.org/x/oauth2 v0.4.0
google.golang.org/appengine v1.6.7
)

require (
github.com/BurntSushi/toml v1.2.1 // indirect
github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53 // indirect
github.com/CloudyKit/jet/v3 v3.0.1 // indirect
github.com/CloudyKit/jet/v6 v6.2.0 // indirect
github.com/Joker/jade v1.1.3 // indirect
github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06 // indirect
github.com/TylerBrock/colorjson v0.0.0-20200706003622-8a50f05110d2 // indirect
github.com/ajg/form v1.5.1 // indirect
github.com/andybalholm/brotli v1.0.5 // indirect
github.com/aymerick/douceur v0.2.0 // indirect
github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible // indirect
github.com/bytedance/sonic v1.9.1 // indirect
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385 // indirect
github.com/fatih/color v1.15.0 // indirect
github.com/fatih/structs v1.1.0 // indirect
github.com/flosch/pongo2/v4 v4.0.2 // indirect
github.com/gabriel-vasile/mimetype v1.4.2 // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/go-playground/locales v0.14.0 // indirect
github.com/go-playground/universal-translator v0.18.0 // indirect
github.com/go-playground/validator/v10 v10.11.1 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-playground/validator/v10 v10.14.0 // indirect
github.com/gobwas/glob v0.2.3 // indirect
github.com/goccy/go-json v0.9.11 // indirect
github.com/goccy/go-json v0.10.2 // indirect
github.com/golang-jwt/jwt v3.2.2+incompatible // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/gorilla/css v1.0.0 // indirect
github.com/imkira/go-interpol v1.1.0 // indirect
github.com/iris-contrib/blackfriday v2.0.0+incompatible // indirect
github.com/iris-contrib/go.uuid v2.0.0+incompatible // indirect
github.com/iris-contrib/jade v1.1.4 // indirect
github.com/iris-contrib/pongo2 v0.0.1 // indirect
github.com/iris-contrib/schema v0.0.6 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/kataras/blocks v0.0.7 // indirect
github.com/kataras/golog v0.1.8 // indirect
github.com/kataras/pio v0.0.11 // indirect
github.com/kataras/sitemap v0.0.6 // indirect
github.com/klauspost/compress v1.16.4 // indirect
github.com/kataras/tunnel v0.0.4 // indirect
github.com/klauspost/compress v1.17.0 // indirect
github.com/klauspost/cpuid/v2 v2.2.4 // indirect
github.com/labstack/gommon v0.4.0 // indirect
github.com/leodido/go-urn v1.2.1 // indirect
github.com/leodido/go-urn v1.2.4 // indirect
github.com/mailgun/raymond/v2 v2.0.48 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.18 // indirect
github.com/microcosm-cc/bluemonday v1.0.21 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/microcosm-cc/bluemonday v1.0.23 // indirect
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/pelletier/go-toml/v2 v2.0.6 // indirect
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/ryanuber/columnize v2.1.2+incompatible // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/sanity-io/litter v1.5.5 // indirect
github.com/savsgio/gotils v0.0.0-20220530130905-52f3993e8d6d // indirect
github.com/schollz/closestmatch v2.1.0+incompatible // indirect
github.com/sergi/go-diff v1.3.1 // indirect
github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect
github.com/sirupsen/logrus v1.8.1 // indirect
github.com/smartystreets/goconvey v1.7.2 // indirect
github.com/stretchr/testify v1.8.2 // indirect
github.com/stretchr/testify v1.8.4 // indirect
github.com/tdewolff/minify/v2 v2.12.4 // indirect
github.com/tdewolff/parse/v2 v2.6.4 // indirect
github.com/tidwall/btree v0.0.0-20191029221954-400434d76274 // indirect
github.com/tidwall/buntdb v1.1.2 // indirect
github.com/tidwall/gjson v1.12.1 // indirect
Expand All @@ -77,23 +87,27 @@ require (
github.com/tidwall/pretty v1.2.0 // indirect
github.com/tidwall/rtree v0.0.0-20180113144539-6cd427091e0e // indirect
github.com/tidwall/tinyqueue v0.0.0-20180302190814-1e39f5511563 // indirect
github.com/ugorji/go/codec v1.2.7 // indirect
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
github.com/ugorji/go/codec v1.2.11 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasttemplate v1.2.2 // indirect
github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0 // indirect
github.com/yosssi/ace v0.0.5 // indirect
github.com/yudai/gojsondiff v1.0.0 // indirect
github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 // indirect
golang.org/x/crypto v0.7.0 // indirect
golang.org/x/net v0.9.0 // indirect
golang.org/x/sys v0.7.0 // indirect
golang.org/x/text v0.9.0 // indirect
golang.org/x/time v0.2.0 // indirect
google.golang.org/protobuf v1.28.1 // indirect
golang.org/x/arch v0.3.0 // indirect
golang.org/x/crypto v0.17.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/sys v0.15.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.3.0 // indirect
google.golang.org/protobuf v1.30.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
moul.io/http2curl/v2 v2.3.0 // indirect
)
Loading

0 comments on commit af44eb7

Please sign in to comment.