Refactor model to modular concerns and add Rails 8.1 support #55
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: Gem Tests | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| name: Ruby ${{ matrix.ruby }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # Testing against all major supported Ruby versions | |
| ruby: ['4.0', '3.5', '3.4', '3.3', '3.2', '3.1', '3.0', '2.7'] | |
| services: | |
| postgres: | |
| image: postgres:16 | |
| env: | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: pg_ltree_test | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ matrix.ruby }} | |
| bundler-cache: true | |
| - name: Setup DB config | |
| run: cp spec/database.yml.sample spec/database.yml | |
| - name: Install Appraisal dependencies | |
| run: bundle exec appraisal install | |
| - name: Run Tests (Appraisal) | |
| run: bundle exec appraisal rake spec | |
| env: | |
| PGHOST: localhost | |
| PGUSER: postgres | |
| PGPASSWORD: postgres | |
| # Dedicated job for linting to fail fast | |
| lint: | |
| runs-on: ubuntu-latest | |
| name: Linting | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: '3.4' | |
| bundler-cache: true | |
| - name: Run Lint | |
| run: bundle exec rake lint |