diff --git a/provider-ci/internal/pkg/templates/bridged-provider.config.yaml b/provider-ci/internal/pkg/templates/bridged-provider.config.yaml index 020a031eb..166a874d5 100644 --- a/provider-ci/internal/pkg/templates/bridged-provider.config.yaml +++ b/provider-ci/internal/pkg/templates/bridged-provider.config.yaml @@ -129,6 +129,9 @@ extraTests: # name: My Test # ... +# Run e2e tests in the provider as well as in the examples directory +integrationTestProvider: false + # Run e2e tests using the examples and test suite in the pulumi/examples repo. # This is unused: https://github.com/search?q=org%3Apulumi+path%3A.ci-mgmt.yaml+%22testPulumiExamples%3A%22&type=code testPulumiExamples: false @@ -208,6 +211,11 @@ publish: # Used in 9 providers: https://github.com/search?q=org%3Apulumi+path%3A.ci-mgmt.yaml+%22docker%3A%22&type=code #docker: false +# Setup SSH with specified private key before running tests in CI job. +# This should be provided from a secret +# Used by the docker provider only: https://github.com/search?q=org%3Apulumi+path%3A.ci-mgmt.yaml+%22sshPrivateKey%3A%22&type=code +#sshPrivateKey: ${{ secrets.PRIVATE_SSH_KEY_FOR_DIGITALOCEAN }} + # Authenticate with GCP before running tests in CI job # Used in gcp and docker: https://github.com/search?q=org%3Apulumi+path%3A.ci-mgmt.yaml+%22gcp%3A%22&type=code #gcp: false diff --git a/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/main.yml b/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/main.yml index 5596a4a42..1f465d795 100644 --- a/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/main.yml +++ b/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/main.yml @@ -190,6 +190,16 @@ jobs: - name: Login to Google Cloud Registry run: gcloud --quiet auth configure-docker #{{- end }}# + #{{- if .Config.sshPrivateKey }}# + - name: Setup SSH key + uses: webfactory/ssh-agent@v0.7.0 + with: + ssh-private-key: #{{ .Config.sshPrivateKey }}# + #{{- end }}# + #{{- if .Config.integrationTestProvider }}# + - name: Prepare upstream code + run: make upstream + #{{- end }}# #{{- if index .Config "setup-script" }}# - name: Run setup script run: #{{ index .Config "setup-script" }}# @@ -204,9 +214,13 @@ jobs: #{{- if .Config.actions.preTest }}# #{{ .Config.actions.preTest | toYaml | indent 4 }}# #{{- end }}# + #{{- if .Config.integrationTestProvider }}# + - name: Run provider tests + working-directory: provider + run: go test -v -json -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt + #{{- end }}# - name: Run tests - run: cd examples && go test -v -json -count=1 -cover -timeout 2h -tags=${{ - matrix.language }} -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt + run: cd examples && go test -v -json -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt strategy: fail-fast: false matrix: diff --git a/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/nightly-test.yml b/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/nightly-test.yml index 56e76603e..4ea9dc3d3 100644 --- a/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/nightly-test.yml +++ b/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/nightly-test.yml @@ -103,6 +103,16 @@ jobs: - name: Login to Google Cloud Registry run: gcloud --quiet auth configure-docker #{{- end }}# + #{{- if .Config.sshPrivateKey }}# + - name: Setup SSH key + uses: webfactory/ssh-agent@v0.7.0 + with: + ssh-private-key: #{{ .Config.sshPrivateKey }}# + #{{- end }}# + #{{- if .Config.integrationTestProvider }}# + - name: Prepare upstream code + run: make upstream + #{{- end }}# #{{- if index .Config "setup-script" }}# - name: Run setup script run: #{{ index .Config "setup-script" }}# @@ -117,6 +127,12 @@ jobs: #{{- if .Config.actions.preTest }}# #{{ .Config.actions.preTest | toYaml | indent 4 }}# #{{- end }}# + #{{- if .Config.integrationTestProvider }}# + - name: Run provider tests + if: matrix.testTarget == 'local' + working-directory: provider + run: go test -v -json -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt + #{{- end }}# - name: Run tests run: cd examples && go test -v -json -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt diff --git a/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/prerelease.yml b/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/prerelease.yml index 7481e5e4c..c4961a836 100644 --- a/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/prerelease.yml +++ b/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/prerelease.yml @@ -131,6 +131,16 @@ jobs: - name: Login to Google Cloud Registry run: gcloud --quiet auth configure-docker #{{- end }}# + #{{- if .Config.sshPrivateKey }}# + - name: Setup SSH key + uses: webfactory/ssh-agent@v0.7.0 + with: + ssh-private-key: #{{ .Config.sshPrivateKey }}# + #{{- end }}# + #{{- if .Config.integrationTestProvider }}# + - name: Prepare upstream code + run: make upstream + #{{- end }}# #{{- if index .Config "setup-script" }}# - name: Run setup script run: #{{ index .Config "setup-script" }}# @@ -145,9 +155,13 @@ jobs: #{{- if .Config.actions.preTest }}# #{{ .Config.actions.preTest | toYaml | indent 4 }}# #{{- end }}# + #{{- if .Config.integrationTestProvider }}# + - name: Run provider tests + working-directory: provider + run: go test -v -json -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt + #{{- end }}# - name: Run tests - run: cd examples && go test -v -json -count=1 -cover -timeout 2h -tags=${{ - matrix.language }} -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt + run: cd examples && go test -v -json -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt strategy: fail-fast: false matrix: diff --git a/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/release.yml b/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/release.yml index 8770c6771..744112e17 100644 --- a/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/release.yml +++ b/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/release.yml @@ -130,6 +130,16 @@ jobs: - name: Login to Google Cloud Registry run: gcloud --quiet auth configure-docker #{{- end }}# + #{{- if .Config.sshPrivateKey }}# + - name: Setup SSH key + uses: webfactory/ssh-agent@v0.7.0 + with: + ssh-private-key: #{{ .Config.sshPrivateKey }}# + #{{- end }}# + #{{- if .Config.integrationTestProvider }}# + - name: Prepare upstream code + run: make upstream + #{{- end }}# #{{- if index .Config "setup-script" }}# - name: Run setup script run: #{{ index .Config "setup-script" }}# @@ -144,9 +154,13 @@ jobs: #{{- if .Config.actions.preTest }}# #{{ .Config.actions.preTest | toYaml | indent 4 }}# #{{- end }}# + #{{- if .Config.integrationTestProvider }}# + - name: Run provider tests + working-directory: provider + run: go test -v -json -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt + #{{- end }}# - name: Run tests - run: cd examples && go test -v -json -count=1 -cover -timeout 2h -tags=${{ - matrix.language }} -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt + run: cd examples && go test -v -json -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt strategy: fail-fast: false matrix: diff --git a/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/run-acceptance-tests.yml b/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/run-acceptance-tests.yml index 3f2cc9ae9..e5e42b449 100644 --- a/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/run-acceptance-tests.yml +++ b/provider-ci/internal/pkg/templates/bridged-provider/.github/workflows/run-acceptance-tests.yml @@ -173,6 +173,16 @@ jobs: - name: Login to Google Cloud Registry run: gcloud --quiet auth configure-docker #{{- end }}# + #{{- if .Config.sshPrivateKey }}# + - name: Setup SSH key + uses: webfactory/ssh-agent@v0.7.0 + with: + ssh-private-key: #{{ .Config.sshPrivateKey }}# + #{{- end }}# + #{{- if .Config.integrationTestProvider }}# + - name: Prepare upstream code + run: make upstream + #{{- end }}# #{{- if index .Config "setup-script" }}# - name: Run setup script run: #{{ index .Config "setup-script" }}# @@ -187,10 +197,15 @@ jobs: #{{- if .Config.actions.preTest }}# #{{ .Config.actions.preTest | toYaml | indent 4 }}# #{{- end }}# + #{{- if .Config.integrationTestProvider }}# + - name: Run provider tests + if: matrix.testTarget == 'local' + working-directory: provider + run: go test -v -json -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt + #{{- end }}# - name: Run tests if: matrix.testTarget == 'local' - run: cd examples && go test -v -json -count=1 -cover -timeout 2h -tags=${{ - matrix.language }} -skip TestPulumiExamples -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt + run: cd examples && go test -v -json -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -skip TestPulumiExamples -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt - name: Run pulumi/examples tests if: matrix.testTarget == 'pulumiExamples' run: cd examples && go test -v -json -count=1 -cover -timeout 2h -tags=${{ diff --git a/provider-ci/test-providers/aws/.github/workflows/master.yml b/provider-ci/test-providers/aws/.github/workflows/master.yml index f3b6ecf39..0a2da02ec 100644 --- a/provider-ci/test-providers/aws/.github/workflows/master.yml +++ b/provider-ci/test-providers/aws/.github/workflows/master.yml @@ -181,8 +181,7 @@ jobs: - name: Make upstream run: make upstream - name: Run tests - run: cd examples && go test -v -json -count=1 -cover -timeout 2h -tags=${{ - matrix.language }} -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt + run: cd examples && go test -v -json -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt strategy: fail-fast: false matrix: diff --git a/provider-ci/test-providers/aws/.github/workflows/prerelease.yml b/provider-ci/test-providers/aws/.github/workflows/prerelease.yml index 3d113d5d1..68db8a196 100644 --- a/provider-ci/test-providers/aws/.github/workflows/prerelease.yml +++ b/provider-ci/test-providers/aws/.github/workflows/prerelease.yml @@ -124,8 +124,7 @@ jobs: - name: Make upstream run: make upstream - name: Run tests - run: cd examples && go test -v -json -count=1 -cover -timeout 2h -tags=${{ - matrix.language }} -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt + run: cd examples && go test -v -json -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt strategy: fail-fast: false matrix: diff --git a/provider-ci/test-providers/aws/.github/workflows/release.yml b/provider-ci/test-providers/aws/.github/workflows/release.yml index 2095913f2..0e6b066a4 100644 --- a/provider-ci/test-providers/aws/.github/workflows/release.yml +++ b/provider-ci/test-providers/aws/.github/workflows/release.yml @@ -123,8 +123,7 @@ jobs: - name: Make upstream run: make upstream - name: Run tests - run: cd examples && go test -v -json -count=1 -cover -timeout 2h -tags=${{ - matrix.language }} -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt + run: cd examples && go test -v -json -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt strategy: fail-fast: false matrix: diff --git a/provider-ci/test-providers/aws/.github/workflows/run-acceptance-tests.yml b/provider-ci/test-providers/aws/.github/workflows/run-acceptance-tests.yml index e3eca3282..3ef166166 100644 --- a/provider-ci/test-providers/aws/.github/workflows/run-acceptance-tests.yml +++ b/provider-ci/test-providers/aws/.github/workflows/run-acceptance-tests.yml @@ -162,8 +162,7 @@ jobs: run: make upstream - name: Run tests if: matrix.testTarget == 'local' - run: cd examples && go test -v -json -count=1 -cover -timeout 2h -tags=${{ - matrix.language }} -skip TestPulumiExamples -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt + run: cd examples && go test -v -json -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -skip TestPulumiExamples -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt - name: Run pulumi/examples tests if: matrix.testTarget == 'pulumiExamples' run: cd examples && go test -v -json -count=1 -cover -timeout 2h -tags=${{ diff --git a/provider-ci/test-providers/cloudflare/.github/workflows/master.yml b/provider-ci/test-providers/cloudflare/.github/workflows/master.yml index aeb56bda9..c89bd645b 100644 --- a/provider-ci/test-providers/cloudflare/.github/workflows/master.yml +++ b/provider-ci/test-providers/cloudflare/.github/workflows/master.yml @@ -166,8 +166,7 @@ jobs: run: | cd provider && go test -v -json -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt - name: Run tests - run: cd examples && go test -v -json -count=1 -cover -timeout 2h -tags=${{ - matrix.language }} -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt + run: cd examples && go test -v -json -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt strategy: fail-fast: false matrix: diff --git a/provider-ci/test-providers/cloudflare/.github/workflows/prerelease.yml b/provider-ci/test-providers/cloudflare/.github/workflows/prerelease.yml index 3adf6cb57..657854b94 100644 --- a/provider-ci/test-providers/cloudflare/.github/workflows/prerelease.yml +++ b/provider-ci/test-providers/cloudflare/.github/workflows/prerelease.yml @@ -111,8 +111,7 @@ jobs: run: | cd provider && go test -v -json -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt - name: Run tests - run: cd examples && go test -v -json -count=1 -cover -timeout 2h -tags=${{ - matrix.language }} -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt + run: cd examples && go test -v -json -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt strategy: fail-fast: false matrix: diff --git a/provider-ci/test-providers/cloudflare/.github/workflows/release.yml b/provider-ci/test-providers/cloudflare/.github/workflows/release.yml index 2b6c12c92..d68897f71 100644 --- a/provider-ci/test-providers/cloudflare/.github/workflows/release.yml +++ b/provider-ci/test-providers/cloudflare/.github/workflows/release.yml @@ -110,8 +110,7 @@ jobs: run: | cd provider && go test -v -json -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt - name: Run tests - run: cd examples && go test -v -json -count=1 -cover -timeout 2h -tags=${{ - matrix.language }} -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt + run: cd examples && go test -v -json -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt strategy: fail-fast: false matrix: diff --git a/provider-ci/test-providers/cloudflare/.github/workflows/run-acceptance-tests.yml b/provider-ci/test-providers/cloudflare/.github/workflows/run-acceptance-tests.yml index a32123348..e63ffa76a 100644 --- a/provider-ci/test-providers/cloudflare/.github/workflows/run-acceptance-tests.yml +++ b/provider-ci/test-providers/cloudflare/.github/workflows/run-acceptance-tests.yml @@ -153,8 +153,7 @@ jobs: cd provider && go test -v -json -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt - name: Run tests if: matrix.testTarget == 'local' - run: cd examples && go test -v -json -count=1 -cover -timeout 2h -tags=${{ - matrix.language }} -skip TestPulumiExamples -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt + run: cd examples && go test -v -json -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -skip TestPulumiExamples -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt - name: Run pulumi/examples tests if: matrix.testTarget == 'pulumiExamples' run: cd examples && go test -v -json -count=1 -cover -timeout 2h -tags=${{ diff --git a/provider-ci/test-providers/docker/.github/workflows/master.yml b/provider-ci/test-providers/docker/.github/workflows/master.yml index 41647df7d..34df5b99a 100644 --- a/provider-ci/test-providers/docker/.github/workflows/master.yml +++ b/provider-ci/test-providers/docker/.github/workflows/master.yml @@ -200,8 +200,7 @@ jobs: with: ssh-private-key: ${{ secrets.PRIVATE_SSH_KEY_FOR_DIGITALOCEAN }} - name: Run tests - run: cd examples && go test -v -json -count=1 -cover -timeout 2h -tags=${{ - matrix.language }} -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt + run: cd examples && go test -v -json -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt strategy: fail-fast: false matrix: diff --git a/provider-ci/test-providers/docker/.github/workflows/prerelease.yml b/provider-ci/test-providers/docker/.github/workflows/prerelease.yml index 6429afee5..e6c311d73 100644 --- a/provider-ci/test-providers/docker/.github/workflows/prerelease.yml +++ b/provider-ci/test-providers/docker/.github/workflows/prerelease.yml @@ -145,8 +145,7 @@ jobs: with: ssh-private-key: ${{ secrets.PRIVATE_SSH_KEY_FOR_DIGITALOCEAN }} - name: Run tests - run: cd examples && go test -v -json -count=1 -cover -timeout 2h -tags=${{ - matrix.language }} -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt + run: cd examples && go test -v -json -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt strategy: fail-fast: false matrix: diff --git a/provider-ci/test-providers/docker/.github/workflows/release.yml b/provider-ci/test-providers/docker/.github/workflows/release.yml index ba7978463..c16fc69be 100644 --- a/provider-ci/test-providers/docker/.github/workflows/release.yml +++ b/provider-ci/test-providers/docker/.github/workflows/release.yml @@ -144,8 +144,7 @@ jobs: with: ssh-private-key: ${{ secrets.PRIVATE_SSH_KEY_FOR_DIGITALOCEAN }} - name: Run tests - run: cd examples && go test -v -json -count=1 -cover -timeout 2h -tags=${{ - matrix.language }} -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt + run: cd examples && go test -v -json -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt strategy: fail-fast: false matrix: diff --git a/provider-ci/test-providers/docker/.github/workflows/run-acceptance-tests.yml b/provider-ci/test-providers/docker/.github/workflows/run-acceptance-tests.yml index 605bfb95d..22f4ab356 100644 --- a/provider-ci/test-providers/docker/.github/workflows/run-acceptance-tests.yml +++ b/provider-ci/test-providers/docker/.github/workflows/run-acceptance-tests.yml @@ -187,8 +187,7 @@ jobs: ssh-private-key: ${{ secrets.PRIVATE_SSH_KEY_FOR_DIGITALOCEAN }} - name: Run tests if: matrix.testTarget == 'local' - run: cd examples && go test -v -json -count=1 -cover -timeout 2h -tags=${{ - matrix.language }} -skip TestPulumiExamples -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt + run: cd examples && go test -v -json -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -skip TestPulumiExamples -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt - name: Run pulumi/examples tests if: matrix.testTarget == 'pulumiExamples' run: cd examples && go test -v -json -count=1 -cover -timeout 2h -tags=${{