ci: Require integrity tests to pass before propagating #52
Workflow file for this run
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 | |
jobs: | |
rubocop_integrity: | |
runs-on: ubuntu-latest | |
timeout-minutes: 3 | |
if: github.repository == 'riboseinc/oss-guides' | |
steps: | |
- name: Check out | |
uses: actions/checkout@v2 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: "3.0" | |
- name: Install gems | |
run: gem install activesupport | |
- name: Recompile the style book | |
run: rake build:rubocop | |
- name: Ensure no differences | |
run: | | |
if [ ! -z "$(git status --short)" ]; then | |
echo "--------------------------------------" | |
echo " Style book is not recompiled " | |
echo " ('rake build:rubocop' was not run) " | |
echo " or compiled files have been edited " | |
echo " instead of source ones " | |
echo "--------------------------------------" | |
fi |