|
@@ -17,12 +17,23 @@ jobs:
|
|
|
steps:
|
|
|
- name: Checkout sources
|
|
|
uses: actions/checkout@v2
|
|
|
+ - name: Install Corepack if needed
|
|
|
+ run: corepack -v || npm install -g corepack
|
|
|
+ - name: Get yarn cache directory path
|
|
|
+ id: yarn-cache-dir-path
|
|
|
+ run: echo "::set-output name=dir::$(corepack yarn config get cacheFolder)"
|
|
|
+
|
|
|
+ - uses: actions/cache@v2
|
|
|
+ id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
|
|
+ with:
|
|
|
+ path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
|
|
+ key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
|
|
+ restore-keys: |
|
|
|
+ ${{ runner.os }}-yarn-
|
|
|
- name: Install Node.js
|
|
|
uses: actions/setup-node@v2
|
|
|
with:
|
|
|
node-version: ${{matrix.node-version}}
|
|
|
- - name: Install Corepack if needed
|
|
|
- run: corepack -v || npm install -g corepack
|
|
|
- name: Install dependencies
|
|
|
run: corepack yarn install --immutable
|
|
|
- name: Run tests
|
|
@@ -34,12 +45,17 @@ jobs:
|
|
|
steps:
|
|
|
- name: Checkout sources
|
|
|
uses: actions/checkout@v2
|
|
|
- - name: Cache npm dependencies
|
|
|
- id: cache-npm-libraries
|
|
|
- uses: actions/cache@v2
|
|
|
+ - name: Get yarn cache directory path
|
|
|
+ id: yarn-cache-dir-path
|
|
|
+ run: echo "::set-output name=dir::$(corepack yarn config get cacheFolder)"
|
|
|
+
|
|
|
+ - uses: actions/cache@v2
|
|
|
+ id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
|
|
with:
|
|
|
- path: .yarn/cache/*
|
|
|
- key: ${{ runner.os }}
|
|
|
+ path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
|
|
+ key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
|
|
+ restore-keys: |
|
|
|
+ ${{ runner.os }}-yarn-
|
|
|
- name: Install Node.js
|
|
|
uses: actions/setup-node@v2
|
|
|
with:
|
|
@@ -55,12 +71,17 @@ jobs:
|
|
|
steps:
|
|
|
- name: Checkout sources
|
|
|
uses: actions/checkout@v2
|
|
|
- - name: Cache npm dependencies
|
|
|
- id: cache-npm-libraries
|
|
|
- uses: actions/cache@v2
|
|
|
+ - name: Get yarn cache directory path
|
|
|
+ id: yarn-cache-dir-path
|
|
|
+ run: echo "::set-output name=dir::$(corepack yarn config get cacheFolder)"
|
|
|
+
|
|
|
+ - uses: actions/cache@v2
|
|
|
+ id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
|
|
with:
|
|
|
- path: .yarn/cache/*
|
|
|
- key: ${{ runner.os }}
|
|
|
+ path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
|
|
+ key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
|
|
+ restore-keys: |
|
|
|
+ ${{ runner.os }}-yarn-
|
|
|
- name: Install Node.js
|
|
|
uses: actions/setup-node@v2
|
|
|
with:
|
|
@@ -76,6 +97,17 @@ jobs:
|
|
|
steps:
|
|
|
- name: Checkout sources
|
|
|
uses: actions/checkout@v2
|
|
|
+ - name: Get yarn cache directory path
|
|
|
+ id: yarn-cache-dir-path
|
|
|
+ run: echo "::set-output name=dir::$(corepack yarn config get cacheFolder)"
|
|
|
+
|
|
|
+ - uses: actions/cache@v2
|
|
|
+ id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
|
|
+ with:
|
|
|
+ path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
|
|
+ key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
|
|
+ restore-keys: |
|
|
|
+ ${{ runner.os }}-yarn-
|
|
|
- name: Install Node.js
|
|
|
uses: actions/setup-node@v2
|
|
|
with:
|