Skip to content

Generate ci.yml as a caller of RoleModel/actions' rails-ci workflow - #234

Merged
OutlawAndy merged 2 commits into
masterfrom
fix/ci-reusable-workflow
Dec 2, 2026
Merged

OutlawAndy merged 2 commits into
masterfrom
fix/ci-reusable-workflow

Conversation

@OutlawAndy

@OutlawAndy OutlawAndy commented Dec 2, 2026 •

Copy link
Copy Markdown
Member

The github generator's ci.yml now calls RoleModel/actions' reusable rails-ci.yml instead of the composite actions, which that README says it replaces. tarsco_bolted_tank's ci.yml was the reference.

Generated ci.yml

name: CI

on:
  push:
    branches: [main]
  pull_request:

concurrency:
  group: ${{ github.workflow }}-${{ github.event.pull_request.number }}-${{ github.event.ref }}
  cancel-in-progress: true

jobs:
  ci:
    uses: RoleModel/actions/.github/workflows/rails-ci.yml@v3
    with:
      # apt_packages: libvips # if ActiveStorage variants are processed in system tests
      playwright: true
      rubocop_command: bundle exec rubocop --format github
      js_lint_command: yarn eslint
      dependency_audit_command: bin/brakeman --quiet --no-pager --exit-on-warn --exit-on-error
      failure-screenshot-dir: tmp/screenshots
    secrets: inherit

Differences from the old template

  • One job instead of four. rails-ci.yml runs setup steps in parallel and includes Project Stats, so the separate project-stats, compile-assets and system and non-system test jobs are gone.
  • Push runs only on main. Previously a branch with an open PR ran CI twice, once for the push and once for the PR.
  • ESLint now runs (yarn eslint, the script the eslint generator adds). The old template never ran it.
  • failure-screenshot-dir: tmp/screenshots matches the save_path in the rspec generator's capybara_config.rb. The old template left it commented out, and rails-ci.yml defaults to tmp/capybara.
  • No bin/bundler-audit. It fails every PR whenever any locked gem has a published advisory, and Dependabot already opens a PR for those. This matches tarsco_bolted_tank, which removed it.
  • --no-playwright now leaves out playwright: true, so system tests use the runner's preinstalled Chrome. It used to set web-driver: selenium on the composite action. set_webdriver is removed.

The database.yml change for CI stays, because rails-ci.yml still sets POSTGRES_USER/POSTGRES_PASSWORD.

Verification

  • The github generator spec passes.
  • I rendered ci.yml with and without --no-playwright against the example app; both versions are valid YAML and match the output above.

🤖 Generated with Claude Code

OutlawAndy and others added 2 commits December 1, 2026 19:38
RoleModel/actions' README says rails-ci.yml supersedes the composite
actions this template used. New apps now get a short caller that runs
RuboCop, ESLint, bundler-audit, Brakeman and the parallel RSpec suite in
one job. CI runs on pushes to main and on pull requests, so a PR branch
no longer runs it twice.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
It fails every PR whenever any locked gem has a published advisory,
which Dependabot already turns into its own pull request.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@OutlawAndy
OutlawAndy merged commit 826c2b3 into master Dec 2, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant