Commit ea8a8a26 authored by tom's avatar tom

try manage node_modules cache with actions/cache@v3

parent fc1cb043
...@@ -42,10 +42,18 @@ jobs: ...@@ -42,10 +42,18 @@ jobs:
node-version: 18 node-version: 18
cache: 'yarn' cache: 'yarn'
- name: Install dependencies - name: Get yarn cache directory path
uses: bahmutov/npm-install@v1 id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
id: yarn-cache
with: with:
useRollingCache: true path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
run: yarn --frozen-lockfile --prefer-offline
- name: Run ESLint - name: Run ESLint
run: yarn lint:eslint run: yarn lint:eslint
...@@ -67,10 +75,18 @@ jobs: ...@@ -67,10 +75,18 @@ jobs:
node-version: 18 node-version: 18
cache: 'yarn' cache: 'yarn'
- name: Install dependencies - name: Get yarn cache directory path
uses: bahmutov/npm-install@v1 id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
id: yarn-cache
with: with:
useRollingCache: true path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
run: yarn --frozen-lockfile --prefer-offline
- name: Run Jest - name: Run Jest
run: yarn test:jest run: yarn test:jest
...@@ -97,10 +113,18 @@ jobs: ...@@ -97,10 +113,18 @@ jobs:
node-version: 18 node-version: 18
cache: 'yarn' cache: 'yarn'
- name: Install dependencies - name: Get yarn cache directory path
uses: bahmutov/npm-install@v1 id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
id: yarn-cache
with: with:
useRollingCache: true path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
run: yarn --frozen-lockfile --prefer-offline
- name: Run PlayWright - name: Run PlayWright
run: HOME=/root yarn test:pw run: HOME=/root yarn test:pw
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment