Skip to content

chore(deps): update actions/cache action to v4.2.0 (#118) #518

chore(deps): update actions/cache action to v4.2.0 (#118)

chore(deps): update actions/cache action to v4.2.0 (#118) #518

Workflow file for this run

name: test
on:
- push
- pull_request
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: test
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
strategy:
fail-fast: false
matrix:
node:
- 18
- 20
- 22
- lts/*
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: ${{ matrix.node }}
- id: npm-cache
run: echo "dir=$(npm config get cache)" | tee -a "$GITHUB_OUTPUT"
- id: npm-cache-restore
uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: npm-${{ hashFiles('package-lock.json') }}
restore-keys: |
npm-
- run: npm ci
- run: npm test
- uses: actions/cache/save@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
if: github.ref_name == 'main'
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ steps.npm-cache-restore.outputs.cache-primary-key }}