File tree 5 files changed +62
-56
lines changed
5 files changed +62
-56
lines changed Original file line number Diff line number Diff line change
1
+ # gofmt always uses LF, whereas Git uses CRLF on Windows.
2
+ * .go text eol =lf
Original file line number Diff line number Diff line change
1
+ name : Go
2
+
3
+ on : [push, pull_request]
4
+
5
+ jobs :
6
+ build :
7
+ runs-on : ${{ matrix.os }}
8
+
9
+ strategy :
10
+ matrix :
11
+ os : [ ubuntu-latest, macos-latest, windows-latest ]
12
+ fail-fast : false
13
+
14
+ steps :
15
+ - uses : actions/checkout@v2
16
+
17
+ - name : Set up Go
18
+ uses : actions/setup-go@v2
19
+ with :
20
+ go-version : 1.17
21
+
22
+ - name : Setup gotestsum
23
+ uses : autero1/action-gotestsum@v1.0.0
24
+ with :
25
+ gotestsum_version : 1.7.0
26
+
27
+ - name : Test
28
+ run : gotestsum --format short-verbose -- -race -timeout=20m -coverprofile=coverage_txt -covermode=atomic ./...
29
+
30
+ - uses : codecov/codecov-action@v2
31
+ with :
32
+ files : coverage_txt
33
+
34
+ lint :
35
+ runs-on : ${{ matrix.os }}
36
+
37
+ strategy :
38
+ matrix :
39
+ os : [ ubuntu-latest, macos-latest, windows-latest ]
40
+ fail-fast : false
41
+
42
+ steps :
43
+ - uses : actions/checkout@v2
44
+ - uses : golangci/golangci-lint-action@v2
45
+ with :
46
+ args : --timeout=5m
Original file line number Diff line number Diff line change @@ -40,3 +40,13 @@ linters:
40
40
- godot
41
41
- tparallel
42
42
- paralleltest
43
+ - cyclop # because we have gocyclo already
44
+ # TODO: review the linters below. We disabled them to make the CI pass first.
45
+ - gocritic
46
+ - revive
47
+ - containedctx
48
+ - ireturn
49
+ - varnamelen
50
+ - forcetypeassert
51
+ - thelper
52
+ - wastedassign
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -46,19 +46,19 @@ func TestStringValidation(t *testing.T) {
46
46
}
47
47
48
48
testCases := []* testParams {
49
- & testParams {
49
+ {
50
50
format : "datetime" ,
51
51
obj : strfmt .NewDateTime (),
52
52
},
53
- & testParams {
53
+ {
54
54
format : "uuid" ,
55
55
obj : strfmt .UUID ("00000000-0000-0000-0000-000000000000" ),
56
56
},
57
- & testParams {
57
+ {
58
58
format : "email" ,
59
59
obj : strfmt .Email ("name@domain.tld" ),
60
60
},
61
- & testParams {
61
+ {
62
62
format : "bsonobjectid" ,
63
63
obj : strfmt .NewObjectId ("60a7903427a1e6666d2b998c" ),
64
64
},
You can’t perform that action at this time.
0 commit comments