Compatibility with rails 8.1 #325
Workflow file for this run
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: Tests | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| types: [opened, reopened, synchronize] | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| # This allows a subsequently queued workflow run to interrupt previous runs. | |
| concurrency: | |
| group: '${{ github.workflow }} @ ${{ github.ref }}' | |
| cancel-in-progress: true | |
| jobs: | |
| # Since the name of the matrix job depends on the version, we define another job with a more stable name. | |
| test_results: | |
| if: ${{ always() }} | |
| runs-on: ubuntu-latest | |
| name: Test Results | |
| needs: [test] | |
| steps: | |
| - run: '[[ "${{ needs.test.result }}" == "success" ]]' | |
| test: | |
| runs-on: ubuntu-latest | |
| services: | |
| postgis: | |
| image: postgis/postgis:${{matrix.pg}} | |
| ports: | |
| - 5432:5432 | |
| env: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| options: >- | |
| --name=postgres | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| env: | |
| AR_VERSION: 8.1.1 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # https://ruby-lang.org/en/downloads/branches | |
| ruby: ['3.4', '3.3', '3.2'] | |
| # https://www.postgresql.org/support/versioning/ | |
| pg: [14-master, 15-master, 16-master, 17-master, 18-3.6-alpine] | |
| steps: | |
| - name: Set Up Actions | |
| uses: actions/checkout@v4 | |
| - name: Install GEOS | |
| run: sudo apt-get install libgeos-dev | |
| - name: Set Up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ matrix.ruby }} | |
| bundler-cache: true | |
| - name: Setup Database | |
| run: | | |
| psql -d postgresql://postgres:postgres@localhost:5432/postgres \ | |
| -c "create database arunit" \ | |
| -c "create database arunit2" | |
| for db in arunit arunit2; do | |
| psql -d postgresql://postgres:postgres@localhost:5432/$db -c "create extension postgis" | |
| done | |
| - name: Run Tests | |
| run: bundle exec rake test | |
| env: | |
| PGHOST: localhost | |
| PGUSER: postgres | |
| PGPASSWORD: postgres | |
| TESTOPTS: --profile=3 | |
| TEST_TIMEOUT: 30 |