Drop support for Ruby 3.1 and Active Record 6.1 #585
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: CI | |
| on: pull_request | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out source code | |
| uses: actions/checkout@v4 | |
| - name: Install Ruby and gems | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| bundler-cache: true | |
| - name: Run RuboCop | |
| run: bin/rake rubocop | |
| version-matrix: | |
| name: Generate version matrix | |
| runs-on: ubuntu-latest | |
| outputs: | |
| matrix: ${{ steps.version-matrix.outputs.matrix }} | |
| steps: | |
| - name: Check out source code | |
| uses: actions/checkout@v4 | |
| - name: Install Ruby | |
| uses: ruby/setup-ruby@v1 | |
| - name: Generate version matrix | |
| id: version-matrix | |
| run: bin/version-matrix | |
| test: | |
| needs: version-matrix | |
| strategy: | |
| matrix: ${{ fromJSON(needs.version-matrix.outputs.matrix) }} | |
| name: Ruby ${{ matrix.ruby }} | PG ${{ matrix.pg }} | Active Record ${{ matrix.activerecord }} | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write | |
| env: | |
| BUNDLE_PATH: ${{ github.workspace }}/vendor/bundle | |
| ACTIVERECORD_VERSION: ${{ matrix.activerecord }} | |
| PG_VERSION: ${{ matrix.pg }} | |
| steps: | |
| - name: Check out source code | |
| uses: actions/checkout@v4 | |
| - name: Install Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ matrix.ruby }} | |
| - name: Update Gemfile.lock | |
| run: bin/bundle lock --update activerecord pg railties | |
| - name: Install gems | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ matrix.ruby }} | |
| bundler-cache: true | |
| - name: Run unit tests | |
| run: bin/rake test:unit | |
| - name: Configure AWS credentials | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| role-to-assume: ${{ secrets.AWS_ROLE_ARN }} | |
| role-session-name: pg-aws_rds_iam-ci-${{ github.run_id }}-${{ github.run_attempt }}-${{ strategy.job-index }} | |
| aws-region: ${{ secrets.AWS_REGION }} | |
| - name: Run acceptance tests | |
| run: bin/rake test:acceptance | |
| env: | |
| DATABASE_URL: ${{ secrets.DATABASE_URL }} | |
| SECURITY_GROUP_ID: ${{ secrets.SECURITY_GROUP_ID }} | |
| - name: Upload test coverage | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-ruby-${{ matrix.ruby }}-pg-${{ matrix.pg }}-activerecord-${{ matrix.activerecord }} | |
| path: coverage/.resultset.json | |
| test-results: | |
| name: Check test results | |
| if: always() | |
| needs: | |
| - version-matrix | |
| - test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check test results | |
| run: test "${{ needs.test.result }}" = "success" | |
| - name: Download test coverage | |
| uses: actions/download-artifact@v4 | |
| with: | |
| pattern: coverage-* | |
| - name: Display structure of downloaded files | |
| run: ls -Ra | |
| # - name: Check out source code | |
| # uses: actions/checkout@v4 | |
| # - name: Install Ruby and gems | |
| # uses: ruby/setup-ruby@v1 | |
| # with: | |
| # bundler-cache: true |