Allow jsonapi.rb 2.x #427
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 | |
- pull_request | |
jobs: | |
RSpec: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
alchemy_branch: | |
- main | |
ruby: | |
- "3.0" | |
- "3.1" | |
- "3.2" | |
env: | |
ALCHEMY_BRANCH: ${{ matrix.alchemy_branch }} | |
steps: | |
- uses: actions/checkout@v3 | |
- 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@v3 | |
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@v3 | |
- name: Restore node modules cache | |
uses: actions/cache@v3 | |
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 |