diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 5b1da467..39aed1bc 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -2,6 +2,7 @@ name: Test Generate Metadata on: push: + pull_request: jobs: test: @@ -9,12 +10,12 @@ jobs: steps: - name: Set up Go 1.x - uses: actions/setup-go@v2 + uses: actions/setup-go@v4 with: go-version: 1.21 - name: Check out code into the Go module directory - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Get dependencies run: go get -v -t -d ./... diff --git a/main_test.go b/main_test.go index 9364babf..115a1a15 100644 --- a/main_test.go +++ b/main_test.go @@ -16,7 +16,7 @@ func TestUpdateReadmeAndMetadata(t *testing.T) { assert.Equal(t, nil, err) testDir := filepath.Join(pwd, "helloworld") modPath := filepath.Join(testDir, "kcl.mod") - ahPath := filepath.Join(testDir, "0.1.1", "artifacthub-pkg.yaml") + ahPath := filepath.Join(IntergrationPath, IntergrationAh, "helloworld", "0.1.1", "artifacthub-pkg.yaml") if utils.DirExists(ahPath) { err = os.Remove(ahPath)