-
Notifications
You must be signed in to change notification settings - Fork 102
37 lines (33 loc) · 1.07 KB
/
no-cheat.yml
File metadata and controls
37 lines (33 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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
permissions:
contents: read
jobs:
no-pylint-disable:
runs-on:
group: databrickslabs-protected-runner-group
labels: linux-ubuntu-latest
if: github.event_name == 'pull_request' && (github.event.action == 'opened' || github.event.action == 'synchronize')
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
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