CI on Future Rails Versions #297
This file contains 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 Future Rails Versions | |
# Experimenting with separate github actions workflow | |
# for gemfiles for FUTURE Rails vesions, we'd like to keep an eye on | |
# if they pass, but they aren't required to do so. | |
# | |
# This has to just be a copy-and-paste copy of our main ci.yml, | |
# but with different gemfiles in the matrix. That is not great. | |
# We also choose NOT to run this one on pull_request, we just | |
# run it on master, see how that works. | |
# | |
# These jobs can be left out of "required" for merge in github settings | |
# for "Branch Protection Rules" at https://github.com/jrochkind/attr_json/settings/branches | |
# | |
# You can move a Rails version between this file and ci.yml, and (un)check it in those | |
# github settings. (I wish whether it was required to pass could be in this file | |
# too, to keep things together) | |
on: | |
push: | |
branches: [ master ] | |
# UTC Sundays 0900. note, no notifications will be sent for failed scheduled builds. :( | |
schedule: | |
- cron: '0 9 * * SUN' | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
jobs: | |
tests: | |
services: | |
db: | |
image: postgres:9.4 | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
ports: ['5432:5432'] | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- gemfile: rails_edge | |
ruby: '3.3' | |
name: ${{ matrix.gemfile }}, ruby ${{ matrix.ruby }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
- name: Bundle install | |
run: | | |
bundle config set gemfile "${GITHUB_WORKSPACE}/gemfiles/${{ matrix.gemfile }}.gemfile" | |
bundle install --jobs 4 --retry 3 | |
- name: Run tests | |
run: bundle exec rspec |