no-cheat #5148
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: no-cheat | |
on: | |
pull_request: | |
types: [opened, synchronize] | |
merge_group: | |
types: [checks_requested] | |
push: | |
# required for merge queue to work. jobs.integration.if will mark it as skipped | |
branches: | |
- main | |
jobs: | |
no-pylint-disable: | |
runs-on: ubuntu-latest | |
if: github.event_name == 'pull_request' && (github.event.action == 'opened' || github.event.action == 'synchronize') | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Verify no additional disabled lint in the new code | |
run: | | |
git fetch origin $GITHUB_BASE_REF:$GITHUB_BASE_REF | |
git diff $GITHUB_BASE_REF...$(git branch --show-current) >> diff_data.txt | |
python tests/unit/no_cheat.py diff_data.txt >> cheats.txt | |
COUNT=$(cat cheats.txt | wc -c) | |
if [ ${COUNT} -gt 1 ]; then | |
cat cheats.txt | |
exit 1 | |
fi |