@@ -113,81 +113,18 @@ jobs:
113113 sha : ${{ github.event.pull_request.head.sha || github.sha }}
114114
115115 test :
116+ # Don't run tests on PRs from forks.
116117 if : github.event_name == 'repository_dispatch' ||
117118 github.event.pull_request.head.repo.full_name == github.repository
118- name : test
119+ uses : ./.github/workflows/ test.yml
119120 needs :
120121 - prerequisites
121122 - build_provider
122123 - build_sdk
123- permissions :
124- contents : read
125- id-token : write
126- runs-on : ubuntu-latest
127- env :
128- PROVIDER_VERSION : ${{ needs.prerequisites.outputs.version }}
129- steps :
130- - name : Checkout Repo
131- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
132- with :
133- ref : ${{ env.PR_COMMIT_SHA }}
134- persist-credentials : false
135- - name : Checkout p/examples
136- if : matrix.testTarget == 'pulumiExamples'
137- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
138- with :
139- repository : pulumi/examples
140- path : p-examples
141- - name : Setup tools
142- uses : ./.github/actions/setup-tools
143- with :
144- tools : pulumictl, pulumicli, ${{ matrix.language }}
145- - name : Prepare local workspace
146- run : make prepare_local_workspace
147- - name : Download bin
148- uses : ./.github/actions/download-bin
149- - name : Download SDK
150- uses : ./.github/actions/download-sdk
151- with :
152- language : ${{ matrix.language }}
153- - name : Restore makefile progress
154- run : make --touch provider schema build_${{ matrix.language }}
155- - name : Update path
156- run : echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH"
157- - name : Install Python deps
158- if : matrix.language == 'python'
159- run : |-
160- pip3 install virtualenv==20.0.23
161- pip3 install pipenv
162- - name : Install dependencies
163- run : make install_${{ matrix.language}}_sdk
164- - name : Install gotestfmt
165- uses : GoTestTools/gotestfmt-action@v2
166- with :
167- token : ${{ secrets.GITHUB_TOKEN }}
168- version : v2.5.0
169- - name : make upstream
170- run : |
171- make upstream
172- - name : Run provider tests
173- run : |
174- cd provider && go test -v -json -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -parallel 4 . 2>&1 | tee /tmp/gotest.log | gotestfmt
175- - name : Run tests
176- if : matrix.testTarget == 'local'
177- run : cd examples && go test -v -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -skip TestPulumiExamples -parallel 4 .
178- - name : Run pulumi/examples tests
179- if : matrix.testTarget == 'pulumiExamples'
180- run : cd examples && go test -v -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -run TestPulumiExamples -parallel 4 .
181- strategy :
182- fail-fast : false
183- matrix :
184- language :
185- - nodejs
186- - python
187- - dotnet
188- - go
189- - java
190- testTarget : [local]
124+ secrets : inherit
125+ with :
126+ version : ${{ needs.prerequisites.outputs.version }}
127+
191128 license_check :
192129 name : License Check
193130 uses : ./.github/workflows/license.yml
0 commit comments