Skip to content

Merge pull request #4221 from andrigamerita/patch-1 #3058

Merge pull request #4221 from andrigamerita/patch-1

Merge pull request #4221 from andrigamerita/patch-1 #3058

Workflow file for this run

name: python3 setup.py lint
# Run lint CI on changes to main branch, or any PR to main. Do not run CI on
# any other branch.
# run only if there are changes on files that are linted (C, python and rst files)
on:
push:
branches: main
paths:
- '**.h'
- '**.c'
- '**.py'
- '**.rst'
- '.pre-commit-config.yaml'
pull_request:
branches:
- main
- 'v**'
paths:
- '**.h'
- '**.c'
- '**.py'
- '**.rst'
- '.pre-commit-config.yaml'
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.5
- uses: actions/setup-python@v5
with:
python-version: 3.x
- uses: pre-commit/action@v3.0.1
format-lint-code-check:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4.1.5
- name: Install deps
run: python3 -m pip install sphinx
- name: Check docs changes are checked in
run: |
python3 setup.py docs
if [[ `git status --porcelain` ]]; then
echo "Generating docs caused changes. Please check them in."
echo "You may need to run: python3 setup.py docs --fullgeneration"
# Run git status again, so people can see what changed.
git status --porcelain
exit 1
fi