ci/cd(lint): bump to v2
This commit is contained in:
@@ -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
@@ -1,4 +1,4 @@
|
|||||||
|
version: 2
|
||||||
|
|
||||||
run:
|
run:
|
||||||
timeout: 5m
|
timeout: 5m
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user