Skip to content

Commit

Permalink
ci/test: Don't use pre-installed Pulumi
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.
  • Loading branch information
abhinav committed Mar 8, 2023
1 parent 35d5a92 commit 28bed6a
Showing 1 changed file with 75 additions and 0 deletions.
75 changes: 75 additions & 0 deletions .github/workflows/workflow.yml
Expand Up @@ -98,6 +98,21 @@ jobs:
os: [ubuntu-latest, macos-latest, windows-latest]
fail-fast: false
steps:
- name: Remove pre-installed Pulumi
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 @@ -132,6 +147,21 @@ jobs:
os: [ubuntu-latest, macos-latest, windows-latest]
fail-fast: false
steps:
- name: Remove pre-installed Pulumi
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 @@ -166,6 +196,21 @@ jobs:
os: [ubuntu-latest, macos-latest, windows-latest]
fail-fast: false
steps:
- name: Remove pre-installed Pulumi
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 @@ -216,6 +261,21 @@ jobs:
os: [ubuntu-latest, macos-latest, windows-latest]
fail-fast: false
steps:
- name: Remove pre-installed Pulumi
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 @@ -276,6 +336,21 @@ jobs:
os: [ubuntu-latest, macos-latest, windows-latest]
fail-fast: false
steps:
- name: Remove pre-installed Pulumi
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 28bed6a

Please sign in to comment.