-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moved mypy from pre-commit to GitHub Action (#775)
- Loading branch information
Showing
3 changed files
with
48 additions
and
14 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,44 @@ | ||
name: mypy | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
mypy: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Cache conda | ||
uses: actions/cache@v4 | ||
env: | ||
# Increase this value to reset cache if environment.yml has not changed | ||
CACHE_NUMBER: 0 | ||
with: | ||
path: ~/conda_pkgs_dir | ||
key: ${{ runner.os }}-py310-conda-${{ env.CACHE_NUMBER }}-${{ | ||
hashFiles('environment.yml') }} | ||
- uses: conda-incubator/setup-miniconda@v3 | ||
with: | ||
miniforge-variant: Mambaforge | ||
miniforge-version: latest | ||
mamba-version: "*" | ||
activate-environment: pytensor-test | ||
channel-priority: strict | ||
environment-file: environment.yml | ||
python-version: "3.10" | ||
use-mamba: true | ||
use-only-tar-bz2: false # IMPORTANT: This may break caching of conda packages! See https://github.com/conda-incubator/setup-miniconda/issues/267 | ||
- name: Install-pytensor and mypy dependencies | ||
run: | | ||
conda activate pytensor-test | ||
pip install -e . | ||
python --version | ||
- name: Run mypy | ||
run: | | ||
conda activate pytensor-test | ||
python ./scripts/run_mypy.py --verbose |
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
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