rubocop #168
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: CI | |
on: push | |
jobs: | |
test: | |
name: CI Ruby ${{ matrix.ruby-version }} AR ${{ matrix.activerecord-version }} | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 2 | |
fail-fast: false | |
matrix: | |
ruby-version: ['2.6.10', '2.7.8', '3.0.6', '3.1.4', '3.2.2', '3.3.0'] | |
activerecord-version: ['5.2', '6.0', '6.1', '7.0', '7.1'] | |
exclude: | |
# Rails 7's gemspec requires ruby >= 2.7 | |
- ruby-version: '2.6.10' | |
activerecord-version: '7.0' | |
- ruby-version: '2.6.10' | |
activerecord-version: '7.1' | |
# Rails 5.x is unlikely ever to support ruby >= 3.0 | |
# https://github.com/rails/rails/issues/40938#issuecomment-751569171 | |
- ruby-version: '3.0.6' | |
activerecord-version: '5.2' | |
- ruby-version: '3.1.4' | |
activerecord-version: '5.2' | |
- ruby-version: '3.2.2' | |
activerecord-version: '5.2' | |
- ruby-version: '3.3.0' | |
activerecord-version: '5.2' | |
steps: | |
- name: Cleanup | |
uses: Automodality/action-clean@v1 | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Build | |
run: docker compose --progress=plain build --build-arg ruby_version=${{ matrix.ruby-version }} --build-arg activerecord_version=${{ matrix.activerecord-version }} | |
- name: Run yamllint | |
run: docker compose run --rm --no-deps app yamllint compose.yaml .standard.yml spec/internal/config/storage.yml spec/internal/config/database.yml .github/workflows/ci.yml .rubocop.yml | |
- name: Run standardrb | |
run: docker compose run --rm --no-deps app bundle exec standardrb | |
- name: Run rubocop | |
run: docker compose run --rm --no-deps app bundle exec rubocop | |
- name: Up | |
run: docker compose --progress=plain up -d | |
- name: Run tests, mysql2 | |
run: docker compose run --rm app bundle exec rake RSPEC_ADAPTER=mysql2 | |
- name: Run tests, postgresql | |
run: docker compose run --rm app bundle exec rake RSPEC_ADAPTER=postgresql | |
- name: Run tests, sqlite3 | |
run: docker compose run --rm app bundle exec rake RSPEC_ADAPTER=sqlite |