chore: cache

This commit is contained in:
Zamitto 2024-10-11 15:33:35 -03:00
parent 9a699e082d
commit 0d909d6eeb
2 changed files with 3 additions and 36 deletions

View File

@ -14,29 +14,11 @@ jobs:
- name: Check out Git repository
uses: actions/checkout@v4
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "YARN_CACHE_DIR=$(yarn cache dir)" >> $GITHUB_ENV
- run: echo $YARN_CACHE_DIR
- name: Cache node modules
id: cache-npm
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
path: ${{ env.YARN_CACHE_DIR }}
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20.11.1
cache: "yarn"
- name: Install dependencies
run: yarn
@ -45,6 +27,7 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: 3.9
cache: "pip"
- name: Install dependencies
run: pip install -r requirements.txt

View File

@ -10,27 +10,11 @@ jobs:
- name: Check out Git repository
uses: actions/checkout@v4
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: Cache node modules
id: cache-npm
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20.11.1
cache: "yarn"
- name: Install dependencies
run: yarn