Skip to content

Commit

Permalink
Update test#835.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
aparnajyothi-y authored Nov 22, 2024
1 parent 635aee9 commit d90f4e3
Showing 1 changed file with 11 additions and 15 deletions.
26 changes: 11 additions & 15 deletions .github/workflows/test#835.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,21 @@ jobs:
runs-on: ubuntu-latest

steps:
# Step 1: Cache npm dependencies
- name: Cache node_modules
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
# Step 2: Setup Node.js
# Step 1: Setup Node.js
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'

# Step 3: Install dependencies using npm ci (with an existing package-lock.json)
# Step 2: Install dependencies using npm install (fallback)
- name: Install dependencies
run: npm ci --verbose
run: npm install --verbose

# Step 4: Check for cache hits and misses
- name: Check for cache hits
run: cat /home/runner/.npm/_logs/*-debug-*.log | grep "cache hit" || echo "No cache hit"
# Step 3: Cache node_modules (optional, if needed for your workflow)
- name: Cache node_modules
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-

0 comments on commit d90f4e3

Please sign in to comment.