trying to fix action #12
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 & lint | |
on: [push, pull_request] | |
env: | |
RAILS_ENV: test | |
PGHOST: localhost | |
PGUSER: postgres | |
jobs: | |
tests: | |
name: Test | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
ruby: [2.7, 3.0, 3.1, 3.2, 3.3] | |
gemfile: ['gemfiles/rails_6_1.gemfile', | |
'gemfiles/rails_7_0.gemfile', | |
'gemfiles/rails_7_1.gemfile', | |
'gemfiles/rails_7_2.gemfile'] | |
runs-on: ${{ matrix.os }} | |
env: | |
BUNDLE_GEMFILE: ${{ matrix.gemfile }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install bundle | |
run: | | |
gem install bundler | |
bundle lock --add-platform x86_64-linux | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
bundler-cache: true | |
- name: Add platforms to Gemfile.lock | |
run: | | |
bundle lock --add-platform x86_64-linux | |
bundle lock --add-platform arm64-darwin | |
- name: Install dependencies | |
run: bundle install --jobs 4 --retry 3 | |
- name: Run tests | |
run: bin/check | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 3.3 | |
bundler-cache: true | |
- name: Install dependencies | |
run: bundle install --jobs 4 --retry 3 | |
- name: Run linters | |
run: bin/fastcheck |