From 86f9c136c293eff5ab35706348dc0db2c15b19d2 Mon Sep 17 00:00:00 2001 From: Adam Spofford <93943719+adamspofford-dfinity@users.noreply.github.com> Date: Wed, 21 Feb 2024 13:22:38 -0800 Subject: [PATCH] chore: Use dfinity/setup-dfx for e2e (#518) --- .github/workflows/e2e.yml | 8 ++++---- .github/workflows/provision-darwin.sh | 5 ----- .github/workflows/provision-linux.sh | 5 ----- 3 files changed, 4 insertions(+), 14 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 3eee3a54..3f0ccf7e 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -27,13 +27,13 @@ jobs: - name: Provision Darwin if: contains(matrix.os, 'macos') run: bash .github/workflows/provision-darwin.sh - env: - INSTALL_DFX_VERSION: ${{ matrix.dfx }} - name: Provision Linux if: contains(matrix.os, 'ubuntu') run: bash .github/workflows/provision-linux.sh - env: - INSTALL_DFX_VERSION: ${{ matrix.dfx }} + - name: Install DFX + uses: dfinity/setup-dfx@main + with: + dfx-version: ${{ matrix.dfx }} - name: Setup for dfx version differences run: | if [[ "${{ matrix.dfx }}" == "0.8.4" ]]; then diff --git a/.github/workflows/provision-darwin.sh b/.github/workflows/provision-darwin.sh index 8bc94f4d..0b4fee67 100755 --- a/.github/workflows/provision-darwin.sh +++ b/.github/workflows/provision-darwin.sh @@ -24,11 +24,6 @@ mkdir /usr/local/lib/bats-support tar --directory /usr/local/lib/bats-support --extract --file bats-support.tar.gz --strip-components 1 rm bats-support.tar.gz -# Install DFINITY SDK. -curl --location --output install-dfx.sh "https://sdk.dfinity.org/install.sh" -DFX_VERSION="$INSTALL_DFX_VERSION" bash install-dfx.sh < <(yes Y) -rm install-dfx.sh - # Set environment variables. BATS_SUPPORT="/usr/local/lib/bats-support" echo "BATS_SUPPORT=${BATS_SUPPORT}" >> "$GITHUB_ENV" diff --git a/.github/workflows/provision-linux.sh b/.github/workflows/provision-linux.sh index 5706a16e..ad770919 100755 --- a/.github/workflows/provision-linux.sh +++ b/.github/workflows/provision-linux.sh @@ -21,11 +21,6 @@ sudo mkdir /usr/local/lib/bats-support sudo tar --directory /usr/local/lib/bats-support --extract --file bats-support.tar.gz --strip-components 1 rm bats-support.tar.gz -# Install DFINITY SDK. -wget --output-document install-dfx.sh "https://sdk.dfinity.org/install.sh" -DFX_VERSION="$INSTALL_DFX_VERSION" bash install-dfx.sh < <(yes Y) -rm install-dfx.sh - # Set environment variables. BATS_SUPPORT="/usr/local/lib/bats-support" echo "BATS_SUPPORT=${BATS_SUPPORT}" >> "$GITHUB_ENV"