diff --git a/.github/workflows/js.yml b/.github/workflows/js.yml index 17ec57b3..545daf39 100644 --- a/.github/workflows/js.yml +++ b/.github/workflows/js.yml @@ -19,13 +19,17 @@ jobs: - uses: actions/setup-node@v1.4.2 with: node-version: ${{ matrix.node }} - - uses: actions/cache@v1 - name: Use Node package cache + - name: Get yarn cache directory path + id: yarn-cache-dir-path + 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: node_modules - key: bundle-use-node-js-${{ matrix.os }}-${{ matrix.node }}-${{ hashFiles('**/yarn.lock', '**/package.json') }} + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }} restore-keys: | - bundle-use-node-js-${{ matrix.os }}-${{ matrix.node }}- + ${{ runner.os }}-yarn-${{ matrix.node }}- - run: yarn install --frozen-lockfile - name: run eslint run: yarn eslint @@ -40,13 +44,17 @@ jobs: - uses: actions/setup-node@v1.4.2 with: node-version: ${{ matrix.node }} - - uses: actions/cache@v1 - name: Use Node package cache + - name: Get yarn cache directory path + id: yarn-cache-dir-path + 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: node_modules - key: bundle-use-node-js-${{ matrix.os }}-${{ matrix.node }}-${{ hashFiles('**/yarn.lock', '**/package.json') }} + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }} restore-keys: | - bundle-use-node-js-${{ matrix.os }}-${{ matrix.node }}- + ${{ runner.os }}-yarn-${{ matrix.node }}- - run: yarn install --frozen-lockfile - name: run jest run: yarn jest @@ -68,14 +76,19 @@ jobs: - uses: actions/setup-node@v1.4.2 with: node-version: ${{ matrix.node }} - - uses: actions/cache@v1 - name: Use Node package cache + - name: Get yarn cache directory path + id: yarn-cache-dir-path + 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: node_modules - key: bundle-use-node-js-${{ matrix.os }}-${{ matrix.node }}-${{ hashFiles('**/yarn.lock', '**/package.json') }} + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }} restore-keys: | - bundle-use-node-js-${{ matrix.os }}-${{ matrix.node }}- + ${{ runner.os }}-yarn-${{ matrix.node }}- - run: yarn install --frozen-lockfile + - uses: ruby/setup-ruby@ec106b438a1ff6ff109590de34ddc62c540232e0 with: ruby-version: ${{ matrix.ruby }} diff --git a/.github/workflows/notice_js.yml b/.github/workflows/notice_js.yml index 76264831..ed6a580b 100644 --- a/.github/workflows/notice_js.yml +++ b/.github/workflows/notice_js.yml @@ -1,5 +1,7 @@ # License: LGPL-3.0-or-later name: NOTICE-js verification +env: + node: 14.6.0 on: push: paths: @@ -20,14 +22,18 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-node@v1.4.2 with: - node-version: 14.6.0 - - uses: actions/cache@v1 - name: Use Node package cache + node-version: ${{ env.node }} + - name: Get yarn cache directory path + id: yarn-cache-dir-path + 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: node_modules - key: bundle-use-node-js-ubuntu-latest-14.6.0-${{ hashFiles('**/yarn.lock', '**/package.json') }} + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ env.node }}-${{ hashFiles('**/yarn.lock') }} restore-keys: | - bundle-use-node-js-ubuntu-latest-14.6.0- + ${{ runner.os }}-yarn-${{ env.node }}- - run: yarn install --frozen-lockfile - name: Verify NOTICE-js run: yarn notice:js \ No newline at end of file diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index f7adc48b..3f45a5c8 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -39,13 +39,17 @@ jobs: - uses: actions/setup-node@v1.4.2 with: node-version: ${{ matrix.node }} - - uses: actions/cache@v1 - name: Use Node package cache + - name: Get yarn cache directory path + id: yarn-cache-dir-path + 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: node_modules - key: bundle-use-node-js-${{ matrix.os }}-${{ matrix.node }}-${{ hashFiles('**/yarn.lock', '**/package.json') }} + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }} restore-keys: | - bundle-use-node-js-${{ matrix.os }}-${{ matrix.node }}- + ${{ runner.os }}-yarn-${{ matrix.node }}- - run: yarn install --frozen-lockfile - uses: ruby/setup-ruby@ec106b438a1ff6ff109590de34ddc62c540232e0 with: