ci/cd(lint): bump to v2
This commit is contained in:
@@ -32,7 +32,9 @@ jobs:
|
||||
cache: true
|
||||
|
||||
- name: Run Linter
|
||||
run: go run github.com/golangci/golangci-lint/cmd/golangci-lint@latest run ./...
|
||||
uses: golangci/golangci-lint-action@v8
|
||||
with:
|
||||
version: v2.1.6
|
||||
|
||||
- name: Run Tests
|
||||
run: go test -v ./...
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
|
||||
version: 2
|
||||
|
||||
run:
|
||||
timeout: 5m
|
||||
|
||||
@@ -37,12 +37,14 @@ func TestUpdateState(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer os.RemoveAll(tmpDir)
|
||||
defer func() { _ = os.RemoveAll(tmpDir) }()
|
||||
|
||||
// Override home dir for testing
|
||||
homeBackup := os.Getenv("HOME")
|
||||
os.Setenv("HOME", tmpDir)
|
||||
defer os.Setenv("HOME", homeBackup)
|
||||
if err := os.Setenv("HOME", tmpDir); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer func() { _ = os.Setenv("HOME", homeBackup) }()
|
||||
|
||||
// Ensure .iris directory exists
|
||||
_ = os.MkdirAll(filepath.Join(tmpDir, ".iris"), 0755)
|
||||
|
||||
Reference in New Issue
Block a user