Update caching and make it more logical
This commit is contained in:
parent
4da1400ae2
commit
731c1a98ee
4 changed files with 25 additions and 21 deletions
21
.github/workflows/js.yml
vendored
21
.github/workflows/js.yml
vendored
|
@ -24,12 +24,12 @@ jobs:
|
||||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||||
|
|
||||||
- uses: actions/cache@v2
|
- uses: actions/cache@v2
|
||||||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
|
||||||
with:
|
with:
|
||||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||||
key: ${{ runner.os }}-yarn-${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }}
|
key: ${{ matrix.os }}-yarn-${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-yarn-${{ matrix.node }}-
|
${{ matrix.os }}-yarn-${{ matrix.node }}-
|
||||||
|
${{ matrix.os }}-yarn-
|
||||||
- run: yarn install --frozen-lockfile
|
- run: yarn install --frozen-lockfile
|
||||||
if: steps.node-cache.outputs.cache-hit != 'true'
|
if: steps.node-cache.outputs.cache-hit != 'true'
|
||||||
- name: run eslint
|
- name: run eslint
|
||||||
|
@ -50,14 +50,13 @@ jobs:
|
||||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||||
|
|
||||||
- uses: actions/cache@v2
|
- uses: actions/cache@v2
|
||||||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
|
||||||
with:
|
with:
|
||||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||||
key: ${{ runner.os }}-yarn-${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }}
|
key: ${{ matrix.os }}-yarn-${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-yarn-${{ matrix.node }}-
|
${{ matrix.os }}-yarn-${{ matrix.node }}-
|
||||||
|
${{ matrix.os }}-yarn-
|
||||||
- run: yarn install --frozen-lockfile
|
- run: yarn install --frozen-lockfile
|
||||||
if: steps.node-cache.outputs.cache-hit != 'true'
|
|
||||||
- name: run jest
|
- name: run jest
|
||||||
run: yarn jest
|
run: yarn jest
|
||||||
webpack:
|
webpack:
|
||||||
|
@ -83,17 +82,17 @@ jobs:
|
||||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||||
|
|
||||||
- uses: actions/cache@v2
|
- uses: actions/cache@v2
|
||||||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
|
||||||
with:
|
with:
|
||||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||||
key: ${{ runner.os }}-yarn-${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }}
|
key: ${{ matrix.os }}-yarn-${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-yarn-${{ matrix.node }}-
|
${{ matrix.os }}-yarn-${{ matrix.node }}-
|
||||||
|
${{ matrix.os }}-yarn-
|
||||||
- run: yarn install --frozen-lockfile
|
- run: yarn install --frozen-lockfile
|
||||||
- uses: ruby/setup-ruby@ec106b438a1ff6ff109590de34ddc62c540232e0
|
- uses: ruby/setup-ruby@ec106b438a1ff6ff109590de34ddc62c540232e0
|
||||||
with:
|
with:
|
||||||
ruby-version: ${{ matrix.ruby }}
|
ruby-version: ${{ matrix.ruby }}
|
||||||
- uses: actions/cache@v1
|
- uses: actions/cache@v2
|
||||||
name: Use Gem cache
|
name: Use Gem cache
|
||||||
with:
|
with:
|
||||||
path: vendor/bundle
|
path: vendor/bundle
|
||||||
|
|
6
.github/workflows/notice_js.yml
vendored
6
.github/workflows/notice_js.yml
vendored
|
@ -2,6 +2,7 @@
|
||||||
name: NOTICE-js verification
|
name: NOTICE-js verification
|
||||||
env:
|
env:
|
||||||
node: 14.6.0
|
node: 14.6.0
|
||||||
|
os: ubuntu-latest
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
paths:
|
paths:
|
||||||
|
@ -31,9 +32,10 @@ jobs:
|
||||||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
||||||
with:
|
with:
|
||||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||||
key: ${{ runner.os }}-yarn-${{ env.node }}-${{ hashFiles('**/yarn.lock') }}
|
key: ${{ env.os }}-yarn-${{ env.node }}-${{ hashFiles('**/yarn.lock') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-yarn-${{ env.node }}-
|
${{ env.os }}-yarn-${{ env.node }}-
|
||||||
|
${{ env.os }}-yarn-
|
||||||
- run: yarn install --frozen-lockfile
|
- run: yarn install --frozen-lockfile
|
||||||
if: steps.node-cache.outputs.cache-hit != 'true'
|
if: steps.node-cache.outputs.cache-hit != 'true'
|
||||||
- name: Verify NOTICE-js
|
- name: Verify NOTICE-js
|
||||||
|
|
13
.github/workflows/notice_ruby.yml
vendored
13
.github/workflows/notice_ruby.yml
vendored
|
@ -11,21 +11,24 @@ on:
|
||||||
- Gemfile
|
- Gemfile
|
||||||
- Gemfile.lock
|
- Gemfile.lock
|
||||||
- NOTICE-ruby
|
- NOTICE-ruby
|
||||||
|
env:
|
||||||
|
os: ubuntu-latest
|
||||||
|
ruby: 2.6.6
|
||||||
jobs:
|
jobs:
|
||||||
notice_ruby:
|
notice_ruby:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ${{ env.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: ruby/setup-ruby@ec106b438a1ff6ff109590de34ddc62c540232e0
|
- uses: ruby/setup-ruby@ec106b438a1ff6ff109590de34ddc62c540232e0
|
||||||
with:
|
with:
|
||||||
ruby-version: 2.6.6
|
ruby-version: ${{ env.ruby }}
|
||||||
- uses: actions/cache@v1
|
- uses: actions/cache@v2
|
||||||
name: Use Gem cache
|
name: Use Gem cache
|
||||||
with:
|
with:
|
||||||
path: vendor/bundle
|
path: vendor/bundle
|
||||||
key: bundle-use-ruby-ubuntu-latest-2.6.6-${{ hashFiles('**/Gemfile.lock') }}
|
key: bundle-use-ruby-${{ env.os }}-${{ env.ruby }}-${{ hashFiles('**/Gemfile.lock') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
bundle-use-ruby-ubuntu-latest-2.6.6-
|
bundle-use-ruby-${{ env.os }}-${{ env.ruby }}-
|
||||||
- run: |
|
- run: |
|
||||||
bundle config deployment true
|
bundle config deployment true
|
||||||
bundle config path vendor/bundle
|
bundle config path vendor/bundle
|
||||||
|
|
6
.github/workflows/ruby.yml
vendored
6
.github/workflows/ruby.yml
vendored
|
@ -47,15 +47,15 @@ jobs:
|
||||||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
||||||
with:
|
with:
|
||||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||||
key: ${{ runner.os }}-yarn-${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }}
|
key: ${{ matrix.os }}-yarn-${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-yarn-${{ matrix.node }}-
|
${{ matrix.os }}-yarn-${{ matrix.node }}-
|
||||||
- run: yarn install --frozen-lockfile
|
- run: yarn install --frozen-lockfile
|
||||||
if: steps.node-cache.outputs.cache-hit != 'true'
|
if: steps.node-cache.outputs.cache-hit != 'true'
|
||||||
- uses: ruby/setup-ruby@ec106b438a1ff6ff109590de34ddc62c540232e0
|
- uses: ruby/setup-ruby@ec106b438a1ff6ff109590de34ddc62c540232e0
|
||||||
with:
|
with:
|
||||||
ruby-version: ${{ matrix.ruby }}
|
ruby-version: ${{ matrix.ruby }}
|
||||||
- uses: actions/cache@v1
|
- uses: actions/cache@v2
|
||||||
name: Use Gem cache
|
name: Use Gem cache
|
||||||
with:
|
with:
|
||||||
path: vendor/bundle
|
path: vendor/bundle
|
||||||
|
|
Loading…
Reference in a new issue