Skip to content

Commit

Permalink
Schedule superglue on Rails main (#58)
Browse files Browse the repository at this point in the history
We want to be prepared for possible breaking changes
when Superglue uses the next version of rails.

Instead of running this as part of our CI on every
contribution, we can run Superglue against Rails main
on a schedule.

The job is scheduled to run on every Thursday.
  • Loading branch information
Stefanni Brasil authored May 8, 2024
1 parent 43da6b2 commit 560c73d
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 5 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/build_rails.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
push:
pull_request:
schedule:
- cron: '0 0 * * 0'
- cron: "0 0 * * 0"
workflow_dispatch:

jobs:
Expand All @@ -12,10 +12,10 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: ['3.3', '3.2', '3.1']
version: ['70', '71', 'main']
ruby: ["3.3", "3.2", "3.1"]
version: ["70", "71"]

runs-on: 'ubuntu-latest'
runs-on: "ubuntu-latest"

steps:
- uses: actions/checkout@v3
Expand All @@ -41,4 +41,3 @@ jobs:
- name: Run acceptance test
working-directory: ./superglue_rails
run: BUNDLE_GEMFILE='' ruby -Ilib:test test/acceptance/superglue_installation_acceptance.rb

33 changes: 33 additions & 0 deletions .github/workflows/schedule_rails_main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Scheduled Rails Main

on:
schedule:
- cron: '0 0 * * 4'

jobs:
build:
name: Rails main
runs-on: ubuntu-latest

strategy:
fail-fast: false

steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
bundler-cache: true
- name: Using Gemfile
working-directory: ./superglue_rails
run: |
mv -f Gemfile.main ./Gemfile
- name: Bundle install
working-directory: ./superglue_rails
run: bundle install
- name: Run unit test
working-directory: ./superglue_rails
run: bundle exec rake test
- name: Run acceptance test
working-directory: ./superglue_rails
run: BUNDLE_GEMFILE='' ruby -Ilib:test test/acceptance/superglue_installation_acceptance.rb

0 comments on commit 560c73d

Please sign in to comment.