CI fixes #447
Workflow file for this run
This file contains 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: Test | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
RSpec: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
alchemy_branch: | |
- 7.0-stable | |
- 7.1-stable | |
- main | |
ruby: | |
- "3.0" | |
- "3.1" | |
- "3.2" | |
- "3.3" | |
env: | |
ALCHEMY_BRANCH: ${{ matrix.alchemy_branch }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
bundler-cache: true | |
- name: Restore apt cache | |
id: apt-cache | |
uses: actions/cache@v4 | |
with: | |
path: /home/runner/apt/cache | |
key: apt-sqlite- | |
- name: Install SQLite headers | |
run: | | |
sudo mkdir -p /home/runner/apt/cache | |
sudo apt-get update -qq | |
sudo apt-get install -qq --fix-missing libsqlite3-dev -o dir::cache::archives="/home/runner/apt/cache" | |
sudo chown -R runner /home/runner/apt/cache | |
- name: Build and test with RSpec | |
env: | |
RAILS_ENV: test | |
DB_USER: user | |
DB_PASSWORD: password | |
DB_PORT: ${{ job.services.mariadb.ports[3306] }} | |
run: bundle exec rake | |
Jest: | |
runs-on: ubuntu-latest | |
env: | |
NODE_ENV: test | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Restore node modules cache | |
uses: actions/cache@v4 | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-yarn-${{ hashFiles('./package.json') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- name: Install yarn | |
run: yarn install | |
- name: Run jest | |
run: yarn jest |