-
Notifications
You must be signed in to change notification settings - Fork 10
41 lines (35 loc) · 1.26 KB
/
yarn-cache.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Cache Dependencies
on:
workflow_call:
jobs:
setup:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Check yarn cache
uses: actions/cache@v3
id: yarn-cache-check
with:
path: |
node_modules
~/.cache/Cypress
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
lookup-only: true
- name: Prepare yarn cache
uses: actions/cache@v3
if: steps.yarn-cache-check.outputs.cache-hit != 'true'
with:
path: |
node_modules
~/.cache/Cypress
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: Install Dependencies
if: steps.yarn-cache-check.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile