-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds GitHub Action to run mypy on Hatchet in CI
- Loading branch information
Showing
1 changed file
with
47 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Run mypy-based type checking | ||
|
||
on: | ||
push: | ||
branches: [ develop ] | ||
pull_request: | ||
branches: [ develop, releases/** ] | ||
|
||
jobs: | ||
|
||
type_check: | ||
|
||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
# TODO: add macos-latest | ||
# TODO: change ubuntu-20.04 back to ubuntu-latest when the following issue is resolved: | ||
# https://github.com/actions/setup-python/issues/162 | ||
os: [ubuntu-20.04] | ||
# TODO: add pypy2, pypy3 | ||
python-version: [3.7, 3.8, 3.9, "3.10", "3.11"] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install Python3 dependencies | ||
run: | | ||
python -m pip install --upgrade pip pytest | ||
pip install -r requirements.txt | ||
# Optional Dependency for HDF Checkpointing | ||
pip install tables | ||
python setup.py install | ||
python setup.py build_ext --inplace | ||
python -m pip list | ||
- name: Install mypy | ||
run: | | ||
python3 -m pip install mypy==1.4.1 | ||
- name: Run mypy | ||
run: | | ||
mypy hatchet --pretty |