ci: precompile (and cache) assets
This avoids the assets to be compiled lazily during the first spec, which confuses test metrics.
This commit is contained in:
parent
a01a619ec0
commit
d0a6fc4b8e
1 changed files with 19 additions and 0 deletions
19
.github/workflows/ci.yml
vendored
19
.github/workflows/ci.yml
vendored
|
@ -90,5 +90,24 @@ jobs:
|
|||
run: |
|
||||
cp config/env.example .env
|
||||
|
||||
- name: Assets cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
public/assets
|
||||
public/packs-test
|
||||
tmp/cache/webpacker
|
||||
key: asset-cache-${{ runner.os }}-${{ github.ref }}-${{ github.sha }}
|
||||
restore-keys: |
|
||||
asset-cache-${{ runner.os }}-${{ github.ref }}-${{ github.sha }}
|
||||
asset-cache-${{ runner.os }}-${{ github.ref }}-
|
||||
asset-cache-${{ runner.os }}-
|
||||
|
||||
- name: Precompile assets
|
||||
env:
|
||||
RAILS_ENV: test
|
||||
run: |
|
||||
bin/rails assets:precompile --trace
|
||||
|
||||
- name: Run tests
|
||||
run: ${{ matrix.pattern }}
|
||||
|
|
Loading…
Reference in a new issue