Skip to content

Type annotations

Type annotations #424

Workflow file for this run

name: DrawBot Test Bench
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test:
runs-on: macos-latest
steps:
- name: Set up Python 3.12
run: |
curl https://www.python.org/ftp/python/3.12.1/python-3.12.1-macos11.pkg --output pythonInstaller.pkg
sudo installer -pkg pythonInstaller.pkg -target /
- name: Check python
run: |
python3 --version
python3 -c "import platform; print('macOS version:', platform.mac_ver()[0]); print('processor:', platform.processor())"
- name: Checkout
uses: actions/checkout@v1
- name: Setup Virtual Environment
run: |
python3 -m venv venv
source venv/bin/activate
python -c "import sys; print('\n'.join(sys.path))"
- name: Install dependencies
run: |
source venv/bin/activate
pip install -r ./test-requirements.txt
pip install .
pip install codecov
- name: Run MyPy on public API
run: |
source venv/bin/activate
mypy --follow-imports=skip drawBot/drawBotDrawingTools.py
mypy --follow-imports=skip drawBot/context/baseContext.py
mypy --follow-imports=skip drawBot/context/tools/imageObject.py
- name: Run tests
run: |
source venv/bin/activate
coverage run ./tests/runAllTests.py
- name: Storing Test Data Artifacts
if: failure()
uses: actions/upload-artifact@master
with:
name: DrawBot Temp Data Results
path: ./tests/tempTestData
- name: Building Test Differences
if: failure()
run: |
source venv/bin/activate
python ./tests/differenceBuilder.py ./tests/tempTestData ./tests/differences.pdf
- name: Storing Test Differences
if: failure()
uses: actions/upload-artifact@master
with:
name: DrawBot Test Differences
path: ./tests/differences.pdf