Skip to content

Commit

Permalink
ci/test: Don't use pre-installed Pulumi (#877)
Browse files Browse the repository at this point in the history
If the tests use the pulumi installed on the GitHub workers,
then they can potentially mask bugs in the action's install step,
which is what happened in #834.
  • Loading branch information
abhinav authored Mar 9, 2023
1 parent 98f5de9 commit 3a600b6
Showing 1 changed file with 80 additions and 0 deletions.
80 changes: 80 additions & 0 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,22 @@ jobs:
os: [ubuntu-latest, macos-latest, windows-latest]
fail-fast: false
steps:
- name: Remove pre-installed Pulumi
shell: bash
env:
RUNNER_OS: ${{ matrix.os }}
run: |
EXT=""
if [ "$RUNNER_OS" == "Windows" ]; then
EXT=".exe"
fi
if command -v "pulumi${EXT}"; then
PULUMI_INSTALL_DIR=$(dirname "$(command -v "pulumi${EXT}")")
echo "Deleting Pulumi"
rm -v "$PULUMI_INSTALL_DIR"/pulumi*
fi
- uses: actions/checkout@v3

- name: Download dist artifact
Expand Down Expand Up @@ -90,6 +106,22 @@ jobs:
os: [ubuntu-latest, macos-latest, windows-latest]
fail-fast: false
steps:
- name: Remove pre-installed Pulumi
shell: bash
env:
RUNNER_OS: ${{ matrix.os }}
run: |
EXT=""
if [ "$RUNNER_OS" == "Windows" ]; then
EXT=".exe"
fi
if command -v "pulumi${EXT}"; then
PULUMI_INSTALL_DIR=$(dirname "$(command -v "pulumi${EXT}")")
echo "Deleting Pulumi"
rm -v "$PULUMI_INSTALL_DIR"/pulumi*
fi
- uses: actions/checkout@v3

- name: Download dist artifact
Expand Down Expand Up @@ -124,6 +156,22 @@ jobs:
os: [ubuntu-latest, macos-latest, windows-latest]
fail-fast: false
steps:
- name: Remove pre-installed Pulumi
shell: bash
env:
RUNNER_OS: ${{ matrix.os }}
run: |
EXT=""
if [ "$RUNNER_OS" == "Windows" ]; then
EXT=".exe"
fi
if command -v "pulumi${EXT}"; then
PULUMI_INSTALL_DIR=$(dirname "$(command -v "pulumi${EXT}")")
echo "Deleting Pulumi"
rm -v "$PULUMI_INSTALL_DIR"/pulumi*
fi
- uses: actions/checkout@v3

- name: Download dist artifact
Expand Down Expand Up @@ -174,6 +222,22 @@ jobs:
os: [ubuntu-latest, macos-latest, windows-latest]
fail-fast: false
steps:
- name: Remove pre-installed Pulumi
shell: bash
env:
RUNNER_OS: ${{ matrix.os }}
run: |
EXT=""
if [ "$RUNNER_OS" == "Windows" ]; then
EXT=".exe"
fi
if command -v "pulumi${EXT}"; then
PULUMI_INSTALL_DIR=$(dirname "$(command -v "pulumi${EXT}")")
echo "Deleting Pulumi"
rm -v "$PULUMI_INSTALL_DIR"/pulumi*
fi
- uses: actions/checkout@v3

- name: Download dist artifact
Expand Down Expand Up @@ -234,6 +298,22 @@ jobs:
os: [ubuntu-latest, macos-latest, windows-latest]
fail-fast: false
steps:
- name: Remove pre-installed Pulumi
shell: bash
env:
RUNNER_OS: ${{ matrix.os }}
run: |
EXT=""
if [ "$RUNNER_OS" == "Windows" ]; then
EXT=".exe"
fi
if command -v "pulumi${EXT}"; then
PULUMI_INSTALL_DIR=$(dirname "$(command -v "pulumi${EXT}")")
echo "Deleting Pulumi"
rm -v "$PULUMI_INSTALL_DIR"/pulumi*
fi
- uses: actions/checkout@v3

- name: Download dist artifact
Expand Down

0 comments on commit 3a600b6

Please sign in to comment.