Github Actions Changeover (#679)

pull/668/merge
Dean Karn 4 years ago committed by GitHub
parent 456221b630
commit 3bb4866602
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      .github/CONTRIBUTING.md
  2. 2
      .github/ISSUE_TEMPLATE.md
  3. 10
      .github/PULL_REQUEST_TEMPLATE.md
  4. 45
      .github/workflows/workflow.yml
  5. 29
      .travis.yml
  6. 6
      validator_test.go

@ -2,7 +2,7 @@
## Quality Standard
To ensure the continued stability of this package, tests are required to be written or already exist in order for a pull request to be merged.
To ensure the continued stability of this package, tests are required that cover the change in order for a pull request to be merged.
## Reporting issues

@ -1,4 +1,4 @@
### Package version eg. v8, v9:
### Package version eg. v9, v10:

@ -1,13 +1,7 @@
Fixes Or Enhances # .
## Fixes Or Enhances
**Make sure that you've checked the boxes below before you submit PR:**
- [ ] Tests exist or have been written that cover this particular change.
Change Details:
-
-
-
@go-playground/admins

@ -0,0 +1,45 @@
on:
push:
branches:
- master
pull_request:
name: Test
jobs:
test:
strategy:
matrix:
go-version: [1.14.x, 1.15.x]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Restore Cache
if: matrix.os != 'ubuntu-latest' && matrix.go-version != '1.15.x'
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-v1-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-v1-go-
- name: Checkout code
uses: actions/checkout@v2
- name: lint
if: matrix.os == 'ubuntu-latest' && matrix.go-version == '1.15.x'
uses: golangci/golangci-lint-action@v2
with:
version: v1.31
- name: Test
run: go test -race -covermode=atomic -coverprofile="profile.cov" ./...
- name: Send Coverage
if: matrix.os == 'ubuntu-latest' && matrix.go-version == '1.15.x'
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: profile.cov

@ -1,29 +0,0 @@
language: go
go:
- 1.15.2
- tip
matrix:
allow_failures:
- go: tip
notifications:
email:
recipients: dean.karn@gmail.com
on_success: change
on_failure: always
before_install:
- go install github.com/mattn/goveralls
- mkdir -p $GOPATH/src/gopkg.in
- ln -s $GOPATH/src/github.com/$TRAVIS_REPO_SLUG $GOPATH/src/gopkg.in/validator.v9
# Only clone the most recent commit.
git:
depth: 1
script:
- go test -v -race -covermode=atomic -coverprofile=coverage.coverprofile ./...
after_success: |
[ $TRAVIS_GO_VERSION = 1.15.2 ] &&
goveralls -coverprofile=coverage.coverprofile -service travis-ci -repotoken $COVERALLS_TOKEN

@ -1789,7 +1789,7 @@ func TestCrossStructEqFieldValidation(t *testing.T) {
errs = validate.Struct(test)
Equal(t, errs, nil)
newTime := time.Now().UTC()
newTime := time.Now().Add(time.Hour).UTC()
test.CreatedAt = &newTime
errs = validate.Struct(test)
@ -4607,7 +4607,7 @@ func TestIsNeFieldValidation(t *testing.T) {
NotEqual(t, errs, nil)
AssertError(t, errs, "Test.Start", "Test.Start", "Start", "Start", "nefield")
now3 := time.Now().UTC()
now3 := time.Now().Add(time.Hour).UTC()
sv = &Test{
Start: &now,
@ -4840,7 +4840,7 @@ func TestIsEqFieldValidation(t *testing.T) {
errs = validate.Struct(sv)
Equal(t, errs, nil)
now3 := time.Now().UTC()
now3 := time.Now().Add(time.Hour).UTC()
sv = &Test{
Start: &now,

Loading…
Cancel
Save