From 909db6b3a27b9b046502a78a193ed87afdf97ce1 Mon Sep 17 00:00:00 2001 From: Sebastian Serth Date: Fri, 12 Aug 2022 09:36:36 +0200 Subject: [PATCH] Precompile assets for spec --- .github/workflows/ci.yml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d8ee32a9..5ebaed00 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,13 +44,18 @@ jobs: node-version: 18 - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn config get cacheFolder)" - - name: Manage yarn cache - uses: actions/cache@v2 + run: echo "::set-output name=dir::$(yarn cache dir)" + - name: Manage yarn, webpack and assets cache + uses: actions/cache@v3 # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) id: yarn-cache with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + path: | + ${{ steps.yarn-cache-dir-path.outputs.dir }} + public/assets + public/packs-test + tmp/cache + tmp/webpacker key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} restore-keys: | ${{ runner.os }}-yarn- @@ -70,6 +75,10 @@ jobs: env: RAILS_ENV: test run: bundler exec rake db:schema:load + - name: Precompile assets + env: + RAILS_ENV: test + run: bundler exec rake assets:precompile - name: Run tests env: RAILS_ENV: test