From 3f052126bc3a15e3a668e7ec2bd0115c7f4019af Mon Sep 17 00:00:00 2001 From: Ian Wahbe Date: Fri, 10 Jan 2025 12:57:10 +0100 Subject: [PATCH] Remove `actions.preTest` in favor of `integrationTestProvider` By using ci-mgmt's intended solution for running integration tests in the `provider/` directory, we get a maintained test script and avoid overloading the `actions.preTest` hook to run tests. Related to https://github.com/pulumi/ci-mgmt/pull/1276, https://github.com/pulumi/ci-mgmt/pull/1274#issuecomment-2582085346 --- .ci-mgmt.yaml | 6 +----- .github/workflows/test.yml | 5 +++-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.ci-mgmt.yaml b/.ci-mgmt.yaml index 0bbb2d7b..0b220458 100644 --- a/.ci-mgmt.yaml +++ b/.ci-mgmt.yaml @@ -16,10 +16,6 @@ plugins: version: "0.0.15" - name: std version: "1.6.2" -actions: - preTest: - - name: Run provider tests - run: | - cd provider && go test -v -json -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt pulumiConvert: 1 registryDocs: true +integrationTestProvider: true diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2526bf50..31f7d705 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -81,8 +81,9 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} version: v2.5.0 - name: Run provider tests - run: | - cd provider && go test -v -json -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt + if: matrix.testTarget == 'local' + working-directory: provider + run: go test -v -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -parallel 4 . - name: Run tests if: matrix.testTarget == 'local' run: cd examples && go test -v -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -skip TestPulumiExamples -parallel 4 .