rubocop: Add more Style/* checks #73
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: Test integrity | |
on: | |
- push | |
- pull_request | |
- workflow_dispatch | |
- workflow_call | |
jobs: | |
rubocop_integrity: | |
runs-on: ubuntu-latest | |
timeout-minutes: 3 | |
if: github.repository == 'riboseinc/oss-guides' | |
steps: | |
- name: Check out | |
uses: actions/checkout@v4 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: "3.1" | |
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | |
- name: Recompile the style book | |
run: bundle exec rake build:rubocop | |
- name: Ensure no differences | |
run: | | |
if [ ! -z "$(git status --short)" ]; then | |
echo "--------------------------------------------------" | |
echo " Style book is not recompiled " | |
echo " ('bundle exec rake build:rubocop' was not run) " | |
echo " or compiled files have been edited " | |
echo " instead of source ones " | |
echo "--------------------------------------------------" | |
fi >&2 |