Skip to content

Commit 009e288

Browse files
committed
wip: debug windows
1 parent e01da53 commit 009e288

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

test/run_test.go

+13-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
package test
22

33
import (
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

326327
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+
327339
binPath := testshared.InstallGolangciLint(t)
328340

329341
cfg := `

0 commit comments

Comments
 (0)