diff --git a/.github/workflows/check_global_api.yml b/.github/workflows/check_global_api.yml new file mode 100644 index 000000000..cdbb600cf --- /dev/null +++ b/.github/workflows/check_global_api.yml @@ -0,0 +1,34 @@ +name: Check Global API + +on: + pull_request: + branches: [ develop ] + +jobs: + check-api: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.9' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install requests Unidecode + + - name: Run automated_api.py + run: python automated_api.py + + - name: Check for changes + run: | + if [ -n "$(git status --porcelain)" ]; then + echo "Error: Running automated_api.py resulted in code changes." + echo "Please run 'python automated_api.py' locally and commit the changes." + git status + git diff + exit 1 + fi