File tree 1 file changed +13
-1
lines changed
1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 1
1
package test
2
2
3
3
import (
4
+ "os"
4
5
"path/filepath"
6
+ "runtime"
5
7
"testing"
6
8
7
9
"github.com/stretchr/testify/require"
@@ -27,7 +29,6 @@ func TestAutogeneratedNoIssues(t *testing.T) {
27
29
WithTargetPath (testdataDir , "autogenerated" ).
28
30
WithBinPath (binPath ).
29
31
Runner ().
30
- Install ().
31
32
Run ().
32
33
ExpectNoIssues ()
33
34
}
@@ -324,6 +325,17 @@ func TestLineDirectiveProcessedFiles(t *testing.T) {
324
325
}
325
326
326
327
func TestUnsafeOk (t * testing.T ) {
328
+ _ , ci := os .LookupEnv ("CI" )
329
+ if runtime .GOOS == "windows" && ci {
330
+ // Tests on Windows and GitHub action that use a file produce a warning and so an exit code 2:
331
+ // level=warning msg=\"[config_reader] Can't pretty print config file path: can't get relative path for path C:\\\\Users\\\\runneradmin\\\\AppData\\\\Local\\\\Temp\\\\golangci_lint_test3234185281.yml and root D:\\\\a\\\\golangci-lint\\\\golangci-lint\\\\test: Rel: can't make C:\\\\Users\\\\runneradmin\\\\AppData\\\\Local\\\\Temp\\\\golangci_lint_test3234185281.yml relative to D:\\\\a\\\\golangci-lint\\\\golangci-lint\\\\test\"
332
+ //
333
+ // In the context of a test that ExpectNoIssues this is problem.
334
+ //
335
+ // NOTE(ldez): I don't want to create flags only for running tests on Windows + GitHub Action.
336
+ t .Skip ("on Windows + GitHub Action" )
337
+ }
338
+
327
339
binPath := testshared .InstallGolangciLint (t )
328
340
329
341
cfg := `
You can’t perform that action at this time.
0 commit comments