| 1 |
name: Static code checks |
| 2 |
|
| 3 |
on: |
| 4 |
push: |
| 5 |
branches: [ master ] |
| 6 |
pull_request: |
| 7 |
branches: [ master ] |
| 8 |
|
| 9 |
jobs: |
| 10 |
static_checks: |
| 11 |
runs-on: ubuntu-latest |
| 12 |
|
| 13 |
steps: |
| 14 |
- uses: actions/checkout@v4 |
| 15 |
|
| 16 |
- name: Set up Python |
| 17 |
uses: actions/setup-python@v5 |
| 18 |
with: |
| 19 |
python-version: '3.12' |
| 20 |
|
| 21 |
- name: Install tox |
| 22 |
run: | |
| 23 |
python -m pip install --upgrade pip tox |
| 24 |
|
| 25 |
- name: Log system information |
| 26 |
run: | |
| 27 |
test -r /etc/os-release && sh -c '. /etc/os-release && echo "OS: $PRETTY_NAME"' |
| 28 |
python --version |
| 29 |
python -c "print('\nENVIRONMENT VARIABLES\n=====================\n')" |
| 30 |
python -c "import os; [print(f'{k}={v}') for k, v in os.environ.items()]" |
| 31 |
|
| 32 |
- name: Run mypy |
| 33 |
run: | |
| 34 |
tox -e mypy |
| 35 |
|
| 36 |
- name: Run pyflakes |
| 37 |
run: | |
| 38 |
tox -e pyflakes |
| 39 |
|
| 40 |
- name: Run pydoctor on its own source and fail on docstring errors |
| 41 |
run: | |
| 42 |
tox -e apidocs |
| 43 |
|
| 44 |
- name: Run docs and check extensions |
| 45 |
run: | |
| 46 |
tox -e testdocs |