Skip to content

Commit 3bb4866

Browse files
author
Dean Karn
authored
Github Actions Changeover (#679)
1 parent 456221b commit 3bb4866

File tree

6 files changed

+52
-42
lines changed

6 files changed

+52
-42
lines changed

.github/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Quality Standard
44

5-
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.
5+
To ensure the continued stability of this package, tests are required that cover the change in order for a pull request to be merged.
66

77
## Reporting issues
88

.github/ISSUE_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
### Package version eg. v8, v9:
1+
### Package version eg. v9, v10:
22

33

44

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
1-
Fixes Or Enhances # .
1+
## Fixes Or Enhances
2+
23

34
**Make sure that you've checked the boxes below before you submit PR:**
45
- [ ] Tests exist or have been written that cover this particular change.
56

6-
Change Details:
7-
8-
-
9-
-
10-
-
11-
12-
137
@go-playground/admins

.github/workflows/workflow.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
pull_request:
6+
name: Test
7+
jobs:
8+
test:
9+
strategy:
10+
matrix:
11+
go-version: [1.14.x, 1.15.x]
12+
os: [ubuntu-latest, macos-latest, windows-latest]
13+
runs-on: ${{ matrix.os }}
14+
steps:
15+
- name: Install Go
16+
uses: actions/setup-go@v2
17+
with:
18+
go-version: ${{ matrix.go-version }}
19+
20+
- name: Restore Cache
21+
if: matrix.os != 'ubuntu-latest' && matrix.go-version != '1.15.x'
22+
uses: actions/cache@v2
23+
with:
24+
path: ~/go/pkg/mod
25+
key: ${{ runner.os }}-v1-go-${{ hashFiles('**/go.sum') }}
26+
restore-keys: |
27+
${{ runner.os }}-v1-go-
28+
29+
- name: Checkout code
30+
uses: actions/checkout@v2
31+
32+
- name: lint
33+
if: matrix.os == 'ubuntu-latest' && matrix.go-version == '1.15.x'
34+
uses: golangci/golangci-lint-action@v2
35+
with:
36+
version: v1.31
37+
38+
- name: Test
39+
run: go test -race -covermode=atomic -coverprofile="profile.cov" ./...
40+
41+
- name: Send Coverage
42+
if: matrix.os == 'ubuntu-latest' && matrix.go-version == '1.15.x'
43+
uses: shogo82148/actions-goveralls@v1
44+
with:
45+
path-to-profile: profile.cov

.travis.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.

validator_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1789,7 +1789,7 @@ func TestCrossStructEqFieldValidation(t *testing.T) {
17891789
errs = validate.Struct(test)
17901790
Equal(t, errs, nil)
17911791

1792-
newTime := time.Now().UTC()
1792+
newTime := time.Now().Add(time.Hour).UTC()
17931793
test.CreatedAt = &newTime
17941794

17951795
errs = validate.Struct(test)
@@ -4607,7 +4607,7 @@ func TestIsNeFieldValidation(t *testing.T) {
46074607
NotEqual(t, errs, nil)
46084608
AssertError(t, errs, "Test.Start", "Test.Start", "Start", "Start", "nefield")
46094609

4610-
now3 := time.Now().UTC()
4610+
now3 := time.Now().Add(time.Hour).UTC()
46114611

46124612
sv = &Test{
46134613
Start: &now,
@@ -4840,7 +4840,7 @@ func TestIsEqFieldValidation(t *testing.T) {
48404840
errs = validate.Struct(sv)
48414841
Equal(t, errs, nil)
48424842

4843-
now3 := time.Now().UTC()
4843+
now3 := time.Now().Add(time.Hour).UTC()
48444844

48454845
sv = &Test{
48464846
Start: &now,

0 commit comments

Comments
 (0)