Skip to content
Snippets Groups Projects
Commit 18b0a51c authored by Guillem Jover's avatar Guillem Jover
Browse files

New upstream version 0.20.2

parents 66a900ef 3d13832e
No related branches found
No related tags found
No related merge requests found
*.go text eol=lf
\ No newline at end of file
name: Go
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17.1
- name: Setup gotestsum
uses: autero1/action-gotestsum@v1.0.0
with:
gotestsum_version: 1.7.0
- name: Test
run: gotestsum --format short-verbose -- -race -timeout=20m -coverprofile=coverage_txt -covermode=atomic ./...
- uses: codecov/codecov-action@v2
with:
files: coverage_txt
lint:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
fail-fast: false
steps:
- uses: actions/checkout@v2
- uses: golangci/golangci-lint-action@v2
with:
args: --timeout=5m
\ No newline at end of file
......@@ -41,3 +41,6 @@ linters:
- errorlint
- paralleltest
- tparallel
- cyclop
- errname
- varnamelen
after_success:
- bash <(curl -s https://codecov.io/bash)
go:
- 1.14.x
- 1.x
arch:
- amd64
jobs:
include:
# only run fast tests on ppc64le
- go: 1.x
arch: ppc64le
script:
- gotestsum -f short-verbose -- ./...
# include linting job, but only for latest go version and amd64 arch
- go: 1.x
arch: amd64
install:
go get github.com/golangci/golangci-lint/cmd/golangci-lint
script:
- golangci-lint run --new-from-rev master
install:
- GO111MODULE=off go get -u gotest.tools/gotestsum
language: go
notifications:
slack:
secure: gZGp9NaHxi7zawlXJXKY92BGeDR1x0tbIcTyU5nMKLq0fhIaiEBJEeALwZ4VgqsSv3DytSSF5mLH8fevAM3ixE6hxjKQ+lQuf7V/w3btCN1CSWgoua5LOh1kTnqZQtJuRvO4pzoJcT3bJWBsVZ07VGNVzzJEy/zAKCHFqBUCXShw7QemlLBcYWFNqveTlvDIfCzvouoLnPoXwxEpkjxe9uz/ZKZgAnup/fXjC8RFctmgCnkCyvJTk0Y/fZCsufixJrJhshBWTnlrFCzRmgNkz2d+i1Ls3+MJ5EJJ2Tx/A5S63dL49J1f9Kr0AKHADmulSy8JNzIckKwbyFMYUecrsW+Lsu9DhnVMy1jj5pKsJDLRi2iIU3fXTMWbcyQbXjbbnBO2mPdP3Tzme75y4D9fc8hUPeyqVv2BU26NEbQ7EF2pKJ93OXvci7HlwRBgdJa8j6mP2LEDClcPQW00g7N/OZe0cTOMa8L5AwiBlbArwqt9wv6YLJoTG0wpDhzWsFvbCg5bJxe28Yn3fIDD0Lk1I7iSnBbp/5gzF19jmxqvcT8tHRkDL4xfjbENFTZjA5uB4Z4pj4WSyWQILLV/Jwhe3fi9uQwdviFHfj5pnVrmNUiGSOQL672K5wl2c3E9mGwejvsu2dfEz28n7Y/FUnOpY3/cBS0n27JJaerS0zMKNLE=
script:
- gotestsum -f short-verbose -- -race -coverprofile=coverage.txt -covermode=atomic ./...
......@@ -191,12 +191,13 @@ func TestValidateName(t *testing.T) {
assert.EqualValues(t, "myValidation", vv.Name)
assert.EqualValues(t, "myMessage", vv.message)
// unchanged
// forced
vv = v.ValidateName("myNewName")
assert.EqualValues(t, "myValidation", vv.Name)
assert.EqualValues(t, "myMessage", vv.message)
assert.EqualValues(t, "myNewName.myValidation", vv.Name)
assert.EqualValues(t, "myNewName.myMessage", vv.message)
v.Name = ""
v.message = "myMessage"
// unchanged
vv = v.ValidateName("")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment