File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 11package test
22
33import (
4+ "os"
45 "path/filepath"
6+ "runtime"
57 "testing"
68
79 "github.com/stretchr/testify/require"
@@ -27,7 +29,6 @@ func TestAutogeneratedNoIssues(t *testing.T) {
2729 WithTargetPath (testdataDir , "autogenerated" ).
2830 WithBinPath (binPath ).
2931 Runner ().
30- Install ().
3132 Run ().
3233 ExpectNoIssues ()
3334}
@@ -324,6 +325,17 @@ func TestLineDirectiveProcessedFiles(t *testing.T) {
324325}
325326
326327func 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+
327339 binPath := testshared .InstallGolangciLint (t )
328340
329341 cfg := `
You can’t perform that action at this time.
0 commit comments