diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a70ac57a..9a74583e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -47,6 +47,22 @@ jobs: with: node-version: 14.17.5 + - name: Find yarn cache location + id: yarn-cache + run: echo "::set-output name=dir::$(yarn cache dir)" + + - name: JS package cache + uses: actions/cache@v4 + with: + path: ${{ steps.yarn-cache.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + + - name: Install packages + run: | + yarn install --pure-lockfile + - name: Precompile assets run: bin/rails assets:precompile