ent/circleci: cache / restore go modules (#86)

Summary:
Pull Request resolved: https://github.com/facebookincubator/ent/pull/86

In addition rename run.deadline golangci-lint config to run.timeout

Reviewed By: a8m

Differential Revision: D17863321

fbshipit-source-id: f863bac6499ddd3066a3ec6e9f518c0d5156f117
This commit is contained in:
Alex Snast
2019-10-12 23:51:30 -07:00
committed by Facebook Github Bot
parent 9521000534
commit 9983309eac
4 changed files with 19 additions and 13 deletions

View File

@@ -1,11 +1,6 @@
version: 2.1
aliases:
- &getmods
run:
name: Downloading go modules
command: go mod download
- &mktestdir
run:
name: Create results directory
@@ -17,6 +12,14 @@ aliases:
orbs:
aws-cli: circleci/aws-cli@0.1.13
go: circleci/go@0.2.0
commands:
getmods:
steps:
- go/load-cache
- go/mod-download
- go/save-cache
jobs:
lint:
@@ -30,12 +33,11 @@ jobs:
command: golangci-lint run --out-format junit-xml > ~/test-results/lint.xml
- *storetestdir
unit:
docker:
- image: circleci/golang
executor: go/default
steps:
- checkout
- *mktestdir
- *getmods
- getmods
- run:
name: Dialect tests
command: gotestsum --junitfile ~/test-results/dialect.xml
@@ -83,7 +85,7 @@ jobs:
-wait tcp://localhost:3308
-wait tcp://localhost:8182
- *mktestdir
- *getmods
- getmods
- run:
name: Run integration tests
working_directory: entc/integration

View File

@@ -1,12 +1,14 @@
run:
tests: true
deadline: 2m
timeout: 2m
linters-settings:
errcheck:
ignore: fmt:.*,Read|Write|Close|Exec,io:Copy
dupl:
threshold: 100
funlen:
lines: 100
statements: 70
linters:
disable-all: true
@@ -14,8 +16,10 @@ linters:
- bodyclose
- deadcode
- depguard
- dogsled
- dupl
- errcheck
- funlen
- gocritic
- gofmt
- gosec
@@ -31,12 +35,14 @@ linters:
- unconvert
- unused
- varcheck
- whitespace
issues:
exclude-rules:
- path: _test\.go
linters:
- dupl
- funlen
- gosec
- linters:
- unused

View File

@@ -75,7 +75,6 @@ func BenchmarkMarshalInterface(b *testing.B) {
b.Fatal(err)
}
}
}
func BenchmarkUnmarshalInterface(b *testing.B) {

View File

@@ -1903,7 +1903,6 @@ func M2MTwoTypes(t *testing.T, client *ent.Client) {
// bar
FirstX(ctx).Name,
)
}
func Tx(t *testing.T, client *ent.Client) {