|
20 | 20 | PULUMI_SKIP_UPDATE_CHECK: true |
21 | 21 |
|
22 | 22 | jobs: |
| 23 | + install-plugins: |
| 24 | + strategy: |
| 25 | + matrix: |
| 26 | + platform: [ubuntu-latest, macos-latest, windows-latest] |
| 27 | + runs-on: ${{ matrix.platform }} |
| 28 | + steps: |
| 29 | + - name: Check out source code |
| 30 | + uses: actions/checkout@master |
| 31 | + - name: Install Go |
| 32 | + uses: actions/setup-go@v5 |
| 33 | + with: |
| 34 | + # Use latest - we only need this for the toolchain |
| 35 | + go-version: 1.24.x |
| 36 | + - name: Find pulumi version |
| 37 | + id: pulumi_version |
| 38 | + shell: bash |
| 39 | + run: | |
| 40 | + GO_MODULE_VERSION=$(go list -m -f '{{.Version}}' github.com/pulumi/pulumi/pkg/v3) |
| 41 | + GO_VERSION=$(echo "$GO_MODULE_VERSION" | sed 's/^v//') |
| 42 | + echo "pulumi_version=$GO_VERSION" |
| 43 | + echo "pulumi_version=$GO_VERSION" >> $GITHUB_OUTPUT |
| 44 | + - name: Install pulumi |
| 45 | + uses: pulumi/actions@v5 |
| 46 | + with: |
| 47 | + pulumi-version: ${{ steps.pulumi_version.outputs.pulumi_version }} |
| 48 | + - name: Cache plugins |
| 49 | + uses: actions/cache@v4 |
| 50 | + with: |
| 51 | + path: ~/.pulumi/plugins |
| 52 | + key: ${{ matrix.platform }}-plugins |
| 53 | + restore-keys: | |
| 54 | + ${{ matrix.platform }}-plugins |
| 55 | + - name: Install plugins |
| 56 | + run: make install_plugins |
23 | 57 | test: |
| 58 | + needs: install-plugins |
24 | 59 | strategy: |
25 | 60 | # Collect all test failures instead of stopping when only one test is failing. |
26 | 61 | fail-fast: false |
@@ -197,6 +232,13 @@ jobs: |
197 | 232 | - name: Shard tests |
198 | 233 | run: echo "RUN_TEST_CMD=$(go run github.com/pulumi/shard@0c8eaa6 --total ${{ env.TOTAL_SHARDS }} --index ${{ matrix.shard }} --seed 314 --error-on-name-clash)" >> $GITHUB_ENV |
199 | 234 | if: ${{ matrix.platform == 'ubuntu-latest' }} |
| 235 | + - name: Restore plugins |
| 236 | + uses: actions/cache/restore@v4 |
| 237 | + with: |
| 238 | + path: ~/.pulumi/plugins |
| 239 | + key: ${{ matrix.platform }}-plugins |
| 240 | + restore-keys: | |
| 241 | + ${{ matrix.platform }}-plugins |
200 | 242 | - name: Test |
201 | 243 | run: make test |
202 | 244 | - name: Upload coverage reports to Codecov |
@@ -226,18 +268,6 @@ jobs: |
226 | 268 | version: v2.1 |
227 | 269 | - name: Lint |
228 | 270 | run: make lint |
229 | | - version-check: |
230 | | - name: Verify Pulumi Version Consistency |
231 | | - runs-on: ubuntu-latest |
232 | | - |
233 | | - steps: |
234 | | - - name: Checkout code |
235 | | - uses: actions/checkout@v3 |
236 | | - |
237 | | - - name: Set up Go |
238 | | - uses: actions/setup-go@v4 |
239 | | - with: |
240 | | - check-latest: true |
241 | 271 | sentinel: |
242 | 272 | name: sentinel |
243 | 273 | if: github.event_name == 'repository_dispatch' || github.event.pull_request.head.repo.full_name == github.repository |
|
0 commit comments