Skip to content

Commit 832af13

Browse files
authored
Merge pull request #309 from ynput/enhancement/ci-validate-global-api
CI: Add CI action to validate global api changes
2 parents c06ebfe + d84fd6f commit 832af13

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Check Global API
2+
3+
on:
4+
pull_request:
5+
branches: [ develop ]
6+
7+
jobs:
8+
check-api:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
13+
- name: Set up Python
14+
uses: actions/setup-python@v5
15+
with:
16+
python-version: '3.9'
17+
18+
- name: Install dependencies
19+
run: |
20+
python -m pip install --upgrade pip
21+
pip install requests Unidecode
22+
23+
- name: Run automated_api.py
24+
run: python automated_api.py
25+
26+
- name: Check for changes
27+
run: |
28+
if [ -n "$(git status --porcelain)" ]; then
29+
echo "Error: Running automated_api.py resulted in code changes."
30+
echo "Please run 'python automated_api.py' locally and commit the changes."
31+
git status
32+
git diff
33+
exit 1
34+
fi

0 commit comments

Comments
 (0)