-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: non-operator Body bug + add CI tests
Signed-off-by: Maxime Soulé <btik-git@scoubidou.com>
- Loading branch information
Showing
8 changed files
with
163 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
test: | ||
strategy: | ||
matrix: | ||
go-version: [1.13.x, 1.14.x, 1.15.x, 1.16.x, 1.17.x, 1.18.x, tip] | ||
full-tests: [false] | ||
include: | ||
- go-version: 1.19.x | ||
full-tests: true | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Setup go | ||
run: | | ||
curl -sL https://raw.githubusercontent.com/maxatome/install-go/v3.3/install-go.pl | | ||
perl - ${{ matrix.go-version }} $HOME/go | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Linting | ||
if: matrix.full-tests | ||
run: | | ||
curl -sL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | | ||
sh -s -- -b $HOME/go/bin v1.50.1 | ||
$HOME/go/bin/golangci-lint run --max-issues-per-linter 0 \ | ||
--max-same-issues 0 \ | ||
-E bidichk \ | ||
-E exportloopref \ | ||
-E gocritic \ | ||
-E godot \ | ||
-E goimports \ | ||
-E maligned \ | ||
-E misspell \ | ||
-E prealloc \ | ||
-E revive \ | ||
-E unconvert \ | ||
-E whitespace \ | ||
./... | ||
- name: Testing | ||
continue-on-error: ${{ matrix.go-version == 'tip' }} | ||
run: | | ||
go version | ||
if [ ${{ matrix.full-tests }} = true ]; then | ||
GO_TEST_OPTS="-covermode=atomic -coverprofile=coverage.out" | ||
fi | ||
export GORACE="halt_on_error=1" | ||
go test -race $GO_TEST_OPTS ./... | ||
- name: Reporting | ||
if: matrix.full-tests | ||
env: | ||
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
go install github.com/mattn/goveralls@v0.0.11 | ||
goveralls -coverprofile=coverage.out -service=github |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
# tdhttpmock | ||
|
||
[](https://github.com/maxatome/tdhttpmock/actions?query=workflow%3ABuild) | ||
[](https://coveralls.io/github/maxatome/tdhttpmock?branch=master) | ||
[](https://pkg.go.dev/github.com/maxatome/tdhttpmock) | ||
|
||
The marriage of [go-testdeep](github.com/maxatome/go-testdeep) and | ||
[httpmock](github.com/jarcoal/httpmock). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,6 @@ | |
//go:build !go1.18 | ||
// +build !go1.18 | ||
|
||
package testdeep | ||
package tdhttpmock | ||
|
||
type any = interface{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,6 @@ | |
//go:build !go1.18 | ||
// +build !go1.18 | ||
|
||
package testdeep_test | ||
package tdhttpmock_test | ||
|
||
type any = interface{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters