Repository navigation
Add test runner integration entrypoints #135
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: build | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - github-actions | |
| pull_request: | |
| schedule: | |
| - cron: "0 18 * * 6" # Saturdays at 12pm CST | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| jobs: | |
| test: | |
| name: Ruby ${{ matrix.ruby-version }} / ${{ matrix.active-record.label }} | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| env: | |
| CI: true | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| ruby-version: ["3.3", "3.4", "4.0"] | |
| active-record: | |
| - label: AR 8.0 | |
| env: ACTIVE_RECORD_VERSION=~> 8.0.0 | |
| - label: AR 8.1 | |
| env: ACTIVE_RECORD_VERSION=~> 8.1.0 | |
| allow-failure: [false] | |
| include: | |
| - ruby-version: "4.0" | |
| active-record: | |
| label: AR main | |
| env: ACTIVE_RECORD_BRANCH=main | |
| allow-failure: true | |
| - ruby-version: "4.0" | |
| active-record: | |
| label: AR 8-1-stable | |
| env: ACTIVE_RECORD_BRANCH=8-1-stable | |
| allow-failure: true | |
| - ruby-version: "4.0" | |
| active-record: | |
| label: AR 8-0-stable | |
| env: ACTIVE_RECORD_BRANCH=8-0-stable | |
| allow-failure: true | |
| # A canary for the next Ruby, which cannot fail the build. | |
| - ruby-version: ruby-head | |
| active-record: | |
| label: AR 8.1 | |
| env: ACTIVE_RECORD_VERSION=~> 8.1.0 | |
| allow-failure: true | |
| continue-on-error: ${{ matrix.allow-failure }} | |
| steps: | |
| - uses: actions/checkout@v7 | |
| # Set the version here rather than prefixing each command, so the matrix | |
| # value reaches the environment without being interpolated into a script. | |
| - name: Select Active Record version | |
| env: | |
| ACTIVE_RECORD_ENV: ${{ matrix.active-record.env }} | |
| run: echo "$ACTIVE_RECORD_ENV" >> "$GITHUB_ENV" | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ matrix.ruby-version }} | |
| bundler-cache: true | |
| cache-version: ${{ matrix.active-record.env }} | |
| # Not bin/rake: bin/ holds generated binstubs and is not checked in, and | |
| # whether bundling writes them there varies by Bundler version - Bundler 4 | |
| # does not, which left Ruby 4.0 with no binstub to run. | |
| - name: Run tests | |
| run: bundle exec rake |