Fix CI cache #220
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci | |
on: push | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Restore cache | |
uses: actions/cache@v4 | |
with: | |
key: cache-${{ hashFiles('bun.lock', 'Gemfile') }} | |
restore-keys: cache | |
path: | | |
node_modules | |
~/.bun/install/cache | |
~/.bundle | |
- name: Set up Bun | |
uses: oven-sh/setup-bun@v2 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 3.4 | |
bundler-cache: false | |
- name: Install dependencies | |
run: | | |
bun i | |
bundle config set path ~/.bundle | |
bundle | |
- name: Run linters | |
run: bin/lint | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
ruby: [3.1, 3.4] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Restore cache | |
uses: actions/cache@v4 | |
with: | |
key: cache-${{ hashFiles('bun.lock', 'Gemfile') }} | |
restore-keys: cache | |
path: | | |
node_modules | |
~/.bun/install/cache | |
~/.bundle | |
- name: Set up Bun | |
uses: oven-sh/setup-bun@v2 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
bundler-cache: false | |
- name: Set up Hotsheet | |
run: | | |
bun i --frozen-lockfile | |
bundle config set path ~/.bundle | |
bundle | |
bundle exec appraisal install | |
bun run build | |
bundle exec rails db:schema:load | |
- name: Run tests | |
run: bin/check |