diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1dc92736..13b943d5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,20 +11,28 @@ jobs: runs-on: ubuntu-latest steps: - - name: Checkout repository - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - - name: Set up Node.js and install dependencies with cache + - name: Set up Node.js uses: actions/setup-node@v4 with: node-version: 20 - cache: 'npm' - cache-dependency-path: | - **/package-lock.json - **/package.json + + - name: Cache node modules + id: cache-npm + uses: actions/cache@v3 + env: + cache-name: cache-node-modules + with: + path: ~/.npm + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- - name: Install dependencies - run: npm install + run: npm i - name: Install Vercel CLI run: npm install -g vercel @@ -35,17 +43,28 @@ jobs: if: startsWith(github.ref, 'refs/tags/mainnet-') steps: - - name: Checkout repository - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - - name: Set up Node.js and install dependencies with cache + - name: Set up Node.js uses: actions/setup-node@v4 with: node-version: 20 - cache: 'npm' - cache-dependency-path: | - **/package-lock.json - **/package.json + + - name: Cache node modules + id: cache-npm + uses: actions/cache@v4 + env: + cache-name: cache-node-modules + with: + path: ~/.npm + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + + - name: Install dependencies + run: npm i - name: Install Vercel CLI run: npm install -g vercel @@ -74,17 +93,28 @@ jobs: if: startsWith(github.ref, 'refs/tags/testnet-') steps: - - name: Checkout repository - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - - name: Set up Node.js and install dependencies with cache + - name: Set up Node.js uses: actions/setup-node@v4 with: node-version: 20 - cache: 'npm' - cache-dependency-path: | - **/package-lock.json - **/package.json + + - name: Cache node modules + id: cache-npm + uses: actions/cache@v4 + env: + cache-name: cache-node-modules + with: + path: ~/.npm + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + + - name: Install dependencies + run: npm i - name: Install Vercel CLI run: npm install -g vercel