mirror of
https://github.com/scratchfoundation/golangci-lint.git
synced 2025-07-29 23:49:08 -04:00
speed up CI and golangci-lint (#1070)
Run CI on mac os only with go1.13 and on windows only on go1.14. Speed up tests. Introduce --allow-parallel-runners. Block on parallel run lock 5s instead of 60s. Don't invalidate analysis cache for minor config changes.
This commit is contained in:
parent
f0012d3248
commit
cb58d1f82e
16 changed files with 145 additions and 71 deletions
test
|
@ -19,7 +19,7 @@ func runGoErrchk(c *exec.Cmd, files []string, t *testing.T) {
|
|||
output, err := c.CombinedOutput()
|
||||
assert.Error(t, err)
|
||||
_, ok := err.(*exec.ExitError)
|
||||
assert.True(t, ok)
|
||||
assert.True(t, ok, err)
|
||||
|
||||
// TODO: uncomment after deprecating go1.11
|
||||
// assert.Equal(t, exitcodes.IssuesFound, exitErr.ExitCode())
|
||||
|
@ -48,9 +48,9 @@ func testSourcesFromDir(t *testing.T, dir string) {
|
|||
|
||||
for _, s := range sources {
|
||||
s := s
|
||||
t.Run(filepath.Base(s), func(t *testing.T) {
|
||||
t.Parallel()
|
||||
testOneSource(t, s)
|
||||
t.Run(filepath.Base(s), func(subTest *testing.T) {
|
||||
subTest.Parallel()
|
||||
testOneSource(subTest, s)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -101,6 +101,7 @@ func saveConfig(t *testing.T, cfg map[string]interface{}) (cfgPath string, finis
|
|||
func testOneSource(t *testing.T, sourcePath string) {
|
||||
args := []string{
|
||||
"run",
|
||||
"--allow-parallel-runners",
|
||||
"--disable-all",
|
||||
"--print-issued-lines=false",
|
||||
"--print-linter-name=false",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue