Skip to content

Commit

Permalink
Add diff-check to catch missing Appraisal runs
Browse files Browse the repository at this point in the history
If we forget to run `bundle exec appraisal`, which is not uncommon, it
means we miss when the appraisal files change. This should catch it and
fail the build, reporting back that they changed and hinting at what
should be done.

https://github.com/nickcharlton/diff-check
https://nickcharlton.net/posts/diff-check-github-action
  • Loading branch information
nickcharlton committed Sep 2, 2024
1 parent 7395034 commit 67dfb56
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
16 changes: 16 additions & 0 deletions .github/workflows/diff-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: diff-check
on: [push]

jobs:
appraisal:
runs-on: ubuntu-latest
env:
DIFF_CHECK_APPRAISAL: "true"
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
- run: bundle install
- uses: nickcharlton/diff-check@main
with:
command: bundle exec appraisal
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
source "https://rubygems.org"
ruby "3.2.2" unless ENV["CI"]
ruby "3.2.2" unless ENV["CI"] && !ENV["DIFF_CHECK_APPRAISAL"]

gemspec

Expand Down

0 comments on commit 67dfb56

Please sign in to comment.