From ff14bcd2ce9e41705645f0a4f879554d035a113b Mon Sep 17 00:00:00 2001 From: Nisheeth Barthwal Date: Wed, 20 Nov 2024 10:54:43 +0100 Subject: [PATCH] fix CI test for install-foundry-zksync --- .github/workflows/test.yml | 3 +-- install-foundry-zksync | 18 +++++++++++++----- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a125cabad..33bd677eb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -132,7 +132,6 @@ jobs: steps: - uses: actions/checkout@v4 - name: Install foundry-zksync - run: | - cd /tmp && curl -L https://raw.githubusercontent.com/matter-labs/foundry-zksync/main/install-foundry-zksync | bash + run: cp ./install-foundry-zksync /tmp/ && cd /tmp && ./install-foundry-zksync - name: Verify installation run: forge --version diff --git a/install-foundry-zksync b/install-foundry-zksync index 328472c4a..e433ed801 100755 --- a/install-foundry-zksync +++ b/install-foundry-zksync @@ -6,9 +6,13 @@ set -e INSTALL_SCRIPT_URL="https://raw.githubusercontent.com/matter-labs/foundry-zksync/main/foundryup-zksync/install" FOUNDRYUP_ZKSYNC_URL="https://raw.githubusercontent.com/matter-labs/foundry-zksync/main/foundryup-zksync/foundryup-zksync" -# Download the install script -echo "Downloading the install script..." -curl -L "$INSTALL_SCRIPT_URL" -o install +if [ -n "${CI}" ]; then + echo "Using local install script..." +else + # Download the install script + echo "Downloading the install script..." + curl -L "$INSTALL_SCRIPT_URL" -o install +fi echo "Making install script executable..." chmod +x ./install @@ -36,8 +40,12 @@ else echo "No shell configuration file detected. Please source your shell manually or start a new terminal session." fi -echo "Downloading foundryup-zksync..." -curl -L "$FOUNDRYUP_ZKSYNC_URL" -o foundryup-zksync +if [ -n "${CI}" ]; then + echo "Using local foundryup-zksync script..." +else + echo "Downloading foundryup-zksync..." + curl -L "$FOUNDRYUP_ZKSYNC_URL" -o foundryup-zksync +fi echo "Making foundryup-zksync executable..." chmod +x ./foundryup-zksync