hap: add imagemagick as a dependency #285
Workflow file for this run
This file contains hidden or 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
# | |
# This workflow is run for pull requests the modify the `tools` directory | |
# and runs tests for the Python scripts in that directory | |
# | |
name: "Test Python tools" | |
on: | |
workflow_dispatch: # manual trigger for debugging | |
push: | |
paths: | |
- 'tools/*' | |
- '.github/workflows/tools-test.yml' # modified workflow may affect tools | |
branches: | |
- main | |
pull_request: | |
paths: | |
- 'tools/*' | |
- '.github/workflows/tools-test.yml' # modified workflow may affect tools | |
jobs: | |
py311: | |
name: "Run tests" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: "Set up Python" | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- name: Install dependencies | |
run: | | |
python -m pip install -r tools/requirements.txt | |
python -m pip install pytest mock black isort | |
- name: Check code formatting | |
run: python -m black --check --diff tools | |
- name: Check imports | |
run: python -m isort --check --profile black tools | |
- name: Validate types | |
run: python -m mypy --disallow-untyped-calls --disallow-untyped-defs tools/*.py | |
- name: Run tests | |
run: python -m pytest tools/tests/test*.py -vv |