Skip to content

Commit

Permalink
Add type checking to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
GNiendorf committed Sep 4, 2024
1 parent db18134 commit edc1012
Showing 1 changed file with 26 additions and 20 deletions.
46 changes: 26 additions & 20 deletions .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,41 @@
name: Python Tests

on:
pull_request:
branches: [ master ]

jobs:
test:
test-and-typecheck:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4

- name: Set up Miniconda
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}

- name: Set up Miniconda
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
- name: Install dependencies
shell: bash -l {0}
run: |
conda create -n tracepyci python=${{ matrix.python-version }} --yes
conda activate tracepyci
conda install --yes numpy scipy matplotlib scikit-learn pandas pytest pytest-cov
pip install mypy types-PyYAML pandas-stubs
pip install .
- name: Install dependencies
shell: bash -l {0}
run: |
conda create -n tracepyci python=${{ matrix.python-version }} --yes
conda activate tracepyci
conda install --yes numpy scipy matplotlib scikit-learn pandas pytest pytest-cov
pip install .
- name: Run tests
shell: bash -l {0}
run: |
conda activate tracepyci
pytest tests/
- name: Run tests
shell: bash -l {0}
run: |
conda activate tracepyci
pytest tests/
- name: Run type checking
shell: bash -l {0}
run: |
conda activate tracepyci
mypy tracepy/ --ignore-missing-imports

0 comments on commit edc1012

Please sign in to comment.