ci/cd(lint): bump to v2

This commit is contained in:
verse91
2026-05-10 01:56:13 +07:00
parent 8108341130
commit bc4dacd9e5
3 changed files with 9 additions and 5 deletions
+3 -1
View File
@@ -32,7 +32,9 @@ jobs:
cache: true cache: true
- name: Run Linter - 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 - name: Run Tests
run: go test -v ./... run: go test -v ./...
+1 -1
View File
@@ -1,4 +1,4 @@
version: 2
run: run:
timeout: 5m timeout: 5m
+5 -3
View File
@@ -37,12 +37,14 @@ func TestUpdateState(t *testing.T) {
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }
defer os.RemoveAll(tmpDir) defer func() { _ = os.RemoveAll(tmpDir) }()
// Override home dir for testing // Override home dir for testing
homeBackup := os.Getenv("HOME") homeBackup := os.Getenv("HOME")
os.Setenv("HOME", tmpDir) if err := os.Setenv("HOME", tmpDir); err != nil {
defer os.Setenv("HOME", homeBackup) t.Fatal(err)
}
defer func() { _ = os.Setenv("HOME", homeBackup) }()
// Ensure .iris directory exists // Ensure .iris directory exists
_ = os.MkdirAll(filepath.Join(tmpDir, ".iris"), 0755) _ = os.MkdirAll(filepath.Join(tmpDir, ".iris"), 0755)