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 6862e65 commit 8a1e5f8
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions .github/workflows/test#835.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Reproduce Cache Miss and Font Awesome Issue
name: Node.js CI

on:
push:
Expand All @@ -13,23 +13,25 @@ jobs:
runs-on: ubuntu-latest

steps:
# Step 1: Checkout the repository
- name: Checkout repository
uses: actions/checkout@v3
# 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 with caching enabled (npm cache)
# Step 2: Setup Node.js
- name: Setup Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v3
with:
node-version: 20
cache: 'npm'
node-version: '18'

# Step 3: Install dependencies (will log cache misses)
# Step 3: Install dependencies with npm ci
- name: Install dependencies
run: npm ci --verbose
shell: bash

# Step 4: Run tests (optional step, for example, to check that your app works)
- name: Run tests
run: npm test
shell: bash
# Step 4: Check logs 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"

0 comments on commit 8a1e5f8

Please sign in to comment.