diff --git a/.github/workflows/js.yml b/.github/workflows/js.yml index 98035f85..f233f7df 100644 --- a/.github/workflows/js.yml +++ b/.github/workflows/js.yml @@ -1,5 +1,7 @@ # License: LGPL-3.0-or-later name: Javascript build and test +env: + ruby: '2.6.6' on: push: paths-ignore: @@ -31,7 +33,20 @@ jobs: ${{ matrix.os }}-yarn-${{ matrix.node }}- ${{ matrix.os }}-yarn- - run: yarn install --frozen-lockfile - if: steps.node-cache.outputs.cache-hit != 'true' + - uses: ruby/setup-ruby@ec106b438a1ff6ff109590de34ddc62c540232e0 + with: + ruby-version: ${{ env.ruby }} + - uses: actions/cache@v2 + name: Use Gem cache + with: + path: vendor/bundle + key: bundle-use-ruby-${{ matrix.os }}-${{ env.ruby }}-${{ hashFiles('**/Gemfile.lock') }} + restore-keys: | + bundle-use-ruby-${{ matrix.os }}-${{ env.ruby }}- + - run: | + bundle config deployment true + bundle config path vendor/bundle + bundle install --jobs 4 - name: run eslint run: yarn eslint jest: @@ -57,6 +72,20 @@ jobs: ${{ matrix.os }}-yarn-${{ matrix.node }}- ${{ matrix.os }}-yarn- - run: yarn install --frozen-lockfile + - uses: ruby/setup-ruby@ec106b438a1ff6ff109590de34ddc62c540232e0 + with: + ruby-version: ${{ env.ruby }} + - uses: actions/cache@v2 + name: Use Gem cache + with: + path: vendor/bundle + key: bundle-use-ruby-${{ matrix.os }}-${{ env.ruby }}-${{ hashFiles('**/Gemfile.lock') }} + restore-keys: | + bundle-use-ruby-${{ matrix.os }}-${{ env.ruby }}- + - run: | + bundle config deployment true + bundle config path vendor/bundle + bundle install --jobs 4 - name: run jest run: yarn jest webpack: @@ -91,14 +120,14 @@ jobs: - run: yarn install --frozen-lockfile - uses: ruby/setup-ruby@ec106b438a1ff6ff109590de34ddc62c540232e0 with: - ruby-version: ${{ matrix.ruby }} + ruby-version: ${{ env.ruby }} - uses: actions/cache@v2 name: Use Gem cache with: path: vendor/bundle - key: bundle-use-ruby-${{ matrix.os }}-${{ matrix.ruby }}-${{ hashFiles('**/Gemfile.lock') }} + key: bundle-use-ruby-${{ matrix.os }}-${{ env.ruby }}-${{ hashFiles('**/Gemfile.lock') }} restore-keys: | - bundle-use-ruby-${{ matrix.os }}-${{ matrix.ruby }}- + bundle-use-ruby-${{ matrix.os }}-${{ env.ruby }}- - run: | bundle config deployment true bundle config path vendor/bundle