Skip to content

Commit

Permalink
Adds GitHub Action to run mypy on Hatchet in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ilumsden committed Nov 14, 2024
1 parent eae6d1f commit 2879542
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/type-checking.yaml
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

0 comments on commit 2879542

Please sign in to comment.