-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(gha): move gha to correct folder
Signed-off-by: Alessio Pragliola <[email protected]>
- Loading branch information
1 parent
d9f0c7c
commit bd579e5
Showing
1 changed file
with
60 additions
and
0 deletions.
There are no files selected for viewing
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
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 |