Enforce type hints for idpf.py idpf_poplar.py tests/*idpf*.py #398
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
name: Test | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- '.github/workflows/test.yml' | |
- 'poc/**' | |
pull_request: | |
paths: | |
- '.github/workflows/test.yml' | |
- 'poc/**' | |
jobs: | |
test: | |
name: "Run unit tests for reference code" | |
runs-on: ubuntu-latest | |
container: | |
image: sagemath/sagemath:latest | |
options: --user root | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: sage --pip install pycryptodomex mypy | |
- name: Run tests | |
working-directory: poc | |
run: sage -python -m unittest | |
- name: Enforce type hints | |
working-directory: poc | |
# TODO(#59) run: sage -python -m mypy *.py tests/*.py | |
run: sage -python -m mypy xof.py field.py flp.py flp_generic.py tests/test_xof.py tests/test_field.py tests/test_flp.py tests/test_flp_generic.py |