# WARNING: This file is autogenerated - changes will be overwritten when regenerated by https://github.com/pulumi/ci-mgmt name: "Test Provider" on: workflow_call: inputs: version: required: true type: string description: Version of the provider to test env: PR_COMMIT_SHA: ${{ github.event.client_payload.pull_request.head.sha }} MISE_ENV: test PULUMI_API: https://api.pulumi-staging.io PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/.. PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget PULUMI_PROVIDER_AUTOMATION_TOKEN: ${{ secrets.PULUMI_PROVIDER_AUTOMATION_TOKEN }} PULUMI_PULUMI_ENABLE_JOURNALING: "true" TF_APPEND_USER_AGENT: pulumi jobs: test: permissions: contents: read id-token: write runs-on: ubuntu-latest env: PROVIDER_VERSION: ${{ inputs.version }} steps: - name: Checkout Repo uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 with: ref: ${{ env.PR_COMMIT_SHA }} persist-credentials: false - id: esc-secrets name: Map environment to ESC outputs uses: ./.github/actions/esc-action - name: Checkout p/examples if: matrix.testTarget == 'pulumiExamples' uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 with: repository: pulumi/examples path: p-examples - name: Setup mise uses: jdx/mise-action@146a28175021df8ca24f8ee1828cc2a60f980bd5 # v3 env: MISE_ENV: test MISE_FETCH_REMOTE_VERSIONS_TIMEOUT: 30s with: version: 2025.11.6 github_token: ${{ steps.esc-secrets.outputs.PULUMI_BOT_TOKEN }} # also save this cache since we are using a different mise env. cache_save: true - name: Prepare local workspace run: make prepare_local_workspace env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Download bin uses: ./.github/actions/download-provider - name: Setup Go Cache uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6 if: matrix.language == 'go' || contains(matrix.language, 'go') with: cache-dependency-path: | provider/*.sum upstream/*.sum sdk/go/*.sum sdk/*.sum *.sum - name: Download SDK uses: ./.github/actions/download-sdk with: language: ${{ matrix.language }} - name: Restore makefile progress run: make --touch provider schema build_${{ matrix.language }} - name: Update path run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH" - name: Install Python deps if: matrix.language == 'python' run: |- pip3 install virtualenv==20.0.23 pip3 install pipenv - name: Install dependencies run: make install_${{ matrix.language}}_sdk - 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 . env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Run pulumi/examples tests if: matrix.testTarget == 'pulumiExamples' run: cd examples && go test -v -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -run TestPulumiExamples -parallel 4 . env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} strategy: fail-fast: false matrix: language: - go - nodejs testTarget: [local]