name: tests on: push: branches: - "master" pull_request: concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: rubocop: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: bundler-cache: true - run: bundle exec rubocop --extra-details --display-style-guide --parallel --force-exclusion tests: strategy: fail-fast: false matrix: ruby-version: ["3.1", "3.2", "3.3"] activerecord-version: - "7.0.8" - "7.1.3.4" - "7.2.0" runs-on: ubuntu-latest services: postgres: image: postgres:14 env: POSTGRES_USER: postgres POSTGRES_DB: safer_migrations_test POSTGRES_PASSWORD: safer_migrations ports: - 5432:5432 options: >- --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 10 env: DATABASE_URL: postgres://postgres:safer_migrations@localhost/safer_migrations_test DATABASE_DEPENDENCY_PORT: "5432" ACTIVERECORD_VERSION: "${{ matrix.activerecord-version }}" steps: - uses: actions/checkout@v4 - name: Set up Ruby uses: ruby/setup-ruby@v1 with: bundler-cache: true ruby-version: "${{ matrix.ruby-version }}" - name: Run specs run: | bundle exec rspec --profile --format progress