Skip to content

Commit

Permalink
fix(gha): move gha to correct folder
Browse files Browse the repository at this point in the history
Signed-off-by: Alessio Pragliola <[email protected]>
  • Loading branch information
Al-Pragliola committed Feb 7, 2025
1 parent d9f0c7c commit bd579e5
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/python-check-autogen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Check python autogenerated code is in sync
on:
push:
branches:
- "main"
paths-ignore:
- "LICENSE*"
- "**.gitignore"
- "**.md"
- "**.txt"
- ".github/ISSUE_TEMPLATE/**"
- ".github/dependabot.yml"
- "docs/**"
pull_request:
paths:
- "clients/python/src/mr_openapi/**"
- "api/openapi/model-registry.yaml"

jobs:
check-autogen:
name: Check autogenerated code is in sync
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Upgrade pip
run: |
pip install --constraint=.github/workflows/constraints.txt pip
pip --version
- name: Install Poetry
run: |
pipx install --pip-args=--constraint=${{ github.workspace }}/.github/workflows/constraints.txt poetry
poetry --version
- name: Install openapi-generator-cli
run: |
make bin/openapi-generator-cli
- name: Generate Python client
working-directory: clients/python
run: |
make clean install tidy
- name: Check if there are uncommitted file changes
run: |
clean=$(git status --porcelain)
if [[ -z "$clean" ]]; then
echo "Empty git status --porcelain: $clean"
else
echo "Uncommitted file changes detected: $clean"
git diff
exit 1
fi

0 comments on commit bd579e5

Please sign in to comment.