From 00eb99ff3cff00c330164902afd2fbf7f78afbbb Mon Sep 17 00:00:00 2001 From: Diego Date: Tue, 5 Nov 2024 17:29:43 -0500 Subject: [PATCH] Update cannon.yml --- .github/workflows/cannon.yml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cannon.yml b/.github/workflows/cannon.yml index c32d1c6f3ea95..7161dd1e29176 100644 --- a/.github/workflows/cannon.yml +++ b/.github/workflows/cannon.yml @@ -23,18 +23,28 @@ jobs: curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to "$HOME/.local/bin" echo "$HOME/.local/bin" >> "$GITHUB_PATH" - # Install Node.js with proper working directory for cache + # Install Node.js without npm cache initially - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: "18" - cache: "npm" - cache-dependency-path: packages/contracts-bedrock/package-lock.json + + # Setup npm cache separately + - name: Cache npm dependencies + uses: actions/cache@v4 + with: + path: | + ~/.npm + packages/contracts-bedrock/node_modules + key: ${{ runner.os }}-npm-${{ hashFiles('packages/contracts-bedrock/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-npm- # Install dependencies in the correct directory - name: Install npm dependencies working-directory: packages/contracts-bedrock - run: npm install + run: | + npm ci - name: Install Foundry uses: foundry-rs/foundry-toolchain@v1