Use actions/setup-node action to cache Yarn files

https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#caching-packages-data

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
This commit is contained in:
Maurício Meneghini Fauth 2022-11-12 18:11:44 -03:00
parent 8af4c84ceb
commit 504886b350
No known key found for this signature in database
GPG Key ID: 6A16FD38AFC89CC8
5 changed files with 9 additions and 53 deletions

View File

@ -43,7 +43,7 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: yarn
cache: 'yarn'
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3

View File

@ -21,19 +21,8 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 14
- name: Get Yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache Yarn dependencies
uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
node-version: '14'
cache: 'yarn'
- name: Install modules
run: yarn install --non-interactive

View File

@ -56,19 +56,8 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 14
- name: Get Yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache Yarn dependencies
uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
node-version: '14'
cache: 'yarn'
- name: Set up Python
uses: actions/setup-python@v2

View File

@ -109,19 +109,8 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 14
- name: Get Yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache Yarn dependencies
uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
node-version: '14'
cache: 'yarn'
- name: Install modules
run: yarn install --non-interactive --production

View File

@ -200,19 +200,8 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 14
- name: Get Yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache Yarn dependencies
uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
node-version: '14'
cache: 'yarn'
- name: Install modules
run: yarn install --non-interactive