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)"
|
||||
|
||||
- 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-${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }}
|
||||
key: ${{ matrix.os }}-yarn-${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-${{ matrix.node }}-
|
||||
${{ matrix.os }}-yarn-${{ matrix.node }}-
|
||||
${{ matrix.os }}-yarn-
|
||||
- run: yarn install --frozen-lockfile
|
||||
if: steps.node-cache.outputs.cache-hit != 'true'
|
||||
- name: run eslint
|
||||
|
@ -50,14 +50,13 @@ jobs:
|
|||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
|
||||
- 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-${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }}
|
||||
key: ${{ matrix.os }}-yarn-${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-${{ matrix.node }}-
|
||||
${{ matrix.os }}-yarn-${{ matrix.node }}-
|
||||
${{ matrix.os }}-yarn-
|
||||
- run: yarn install --frozen-lockfile
|
||||
if: steps.node-cache.outputs.cache-hit != 'true'
|
||||
- name: run jest
|
||||
run: yarn jest
|
||||
webpack:
|
||||
|
@ -83,17 +82,17 @@ jobs:
|
|||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
|
||||
- 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-${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }}
|
||||
key: ${{ matrix.os }}-yarn-${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-${{ matrix.node }}-
|
||||
${{ matrix.os }}-yarn-${{ matrix.node }}-
|
||||
${{ matrix.os }}-yarn-
|
||||
- run: yarn install --frozen-lockfile
|
||||
- uses: ruby/setup-ruby@ec106b438a1ff6ff109590de34ddc62c540232e0
|
||||
with:
|
||||
ruby-version: ${{ matrix.ruby }}
|
||||
- uses: actions/cache@v1
|
||||
- uses: actions/cache@v2
|
||||
name: Use Gem cache
|
||||
with:
|
||||
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
|
||||
env:
|
||||
node: 14.6.0
|
||||
os: ubuntu-latest
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
|
@ -31,9 +32,10 @@ jobs:
|
|||
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-${{ env.node }}-${{ hashFiles('**/yarn.lock') }}
|
||||
key: ${{ env.os }}-yarn-${{ env.node }}-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-${{ env.node }}-
|
||||
${{ env.os }}-yarn-${{ env.node }}-
|
||||
${{ env.os }}-yarn-
|
||||
- run: yarn install --frozen-lockfile
|
||||
if: steps.node-cache.outputs.cache-hit != 'true'
|
||||
- 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.lock
|
||||
- NOTICE-ruby
|
||||
env:
|
||||
os: ubuntu-latest
|
||||
ruby: 2.6.6
|
||||
jobs:
|
||||
notice_ruby:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ${{ env.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ruby/setup-ruby@ec106b438a1ff6ff109590de34ddc62c540232e0
|
||||
with:
|
||||
ruby-version: 2.6.6
|
||||
- uses: actions/cache@v1
|
||||
ruby-version: ${{ env.ruby }}
|
||||
- uses: actions/cache@v2
|
||||
name: Use Gem cache
|
||||
with:
|
||||
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: |
|
||||
bundle-use-ruby-ubuntu-latest-2.6.6-
|
||||
bundle-use-ruby-${{ env.os }}-${{ env.ruby }}-
|
||||
- run: |
|
||||
bundle config deployment true
|
||||
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'`)
|
||||
with:
|
||||
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: |
|
||||
${{ runner.os }}-yarn-${{ matrix.node }}-
|
||||
${{ matrix.os }}-yarn-${{ matrix.node }}-
|
||||
- run: yarn install --frozen-lockfile
|
||||
if: steps.node-cache.outputs.cache-hit != 'true'
|
||||
- uses: ruby/setup-ruby@ec106b438a1ff6ff109590de34ddc62c540232e0
|
||||
with:
|
||||
ruby-version: ${{ matrix.ruby }}
|
||||
- uses: actions/cache@v1
|
||||
- uses: actions/cache@v2
|
||||
name: Use Gem cache
|
||||
with:
|
||||
path: vendor/bundle
|
||||
|
|
Loading…
Reference in a new issue