Skip to content

Commit df9a590

Browse files
committed
Fix CI cache
1 parent dd9766c commit df9a590

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@ jobs:
1414

1515
- name: Restore cache
1616
uses: actions/cache@v4
17+
id: cache
1718
with:
18-
key: cache-${{ hashFiles('bun.lock', 'Gemfile') }}
19-
restore-keys: cache
19+
key: lint-${{ hashFiles('bun.lock', 'gemfiles/*.lock') }}
20+
restore-keys: lint
2021
path: |
2122
node_modules
2223
~/.bun/install/cache
@@ -32,6 +33,7 @@ jobs:
3233
bundler-cache: false
3334

3435
- name: Install dependencies
36+
if: steps.cache.outputs.cache-hit != 'true'
3537
run: bun i && bundle
3638

3739
- name: Run linters
@@ -48,9 +50,10 @@ jobs:
4850

4951
- name: Restore cache
5052
uses: actions/cache@v4
53+
id: cache
5154
with:
52-
key: cache-${{ hashFiles('bun.lock', 'Gemfile') }}
53-
restore-keys: cache
55+
key: test-${{ matrix.ruby }}-${{ hashFiles('bun.lock', 'gemfiles/*.lock') }}
56+
restore-keys: test-${{ matrix.ruby }}
5457
path: |
5558
node_modules
5659
~/.bun/install/cache
@@ -65,13 +68,12 @@ jobs:
6568
ruby-version: ${{ matrix.ruby }}
6669
bundler-cache: false
6770

68-
- name: Set up Hotsheet
69-
run: |
70-
bun i --frozen-lockfile
71-
bundle
72-
bundle exec appraisal install
73-
bun run build
74-
bundle exec rails db:schema:load
71+
- name: Install dependencies
72+
if: steps.cache.outputs.cache-hit != 'true'
73+
run: bun i && bundle && bundle exec appraisal install
74+
75+
- name: Bundle assets and prepare database
76+
run: bun run build && bundle exec rails db:schema:load
7577

7678
- name: Run tests
7779
run: bin/check

0 commit comments

Comments
 (0)