From e0c0a1dc79419db940aa193b399199f42ecc284b Mon Sep 17 00:00:00 2001 From: Sam Ruby Date: Mon, 5 Oct 2026 07:31:49 -0400 Subject: [PATCH] Check templates with bin/rails herb:check in CI Rails 8.2 compiles HTML templates through Herb in strict mode, so a template that doesn't compile fails to render. herb:check boots the app, which loads ruby-vips, hence libvips. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/ci.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4cfd977..1c6ead0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,6 +48,29 @@ jobs: - name: Lint code for consistent style run: bin/rubocop + herb: + name: Herb check + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - name: Install packages + run: sudo apt-get update && sudo apt-get install --no-install-recommends -y libvips + + - name: Checkout code + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + + - name: Set up Ruby + uses: ruby/setup-ruby@a0102e0972be65f351c307e2d64b9314a57c8073 # v1.324.0 + with: + ruby-version: .ruby-version + bundler-cache: true + + - name: Check that every HTML template compiles through Herb + run: bin/rails herb:check + lint-actions: name: GitHub Actions audit runs-on: ubuntu-latest