|
14 | 14 | - uses: actions/checkout@v2
|
15 | 15 | - uses: actions/setup-python@v2
|
16 | 16 | - uses: pre-commit/[email protected]
|
| 17 | + mypy: |
| 18 | + runs-on: ubuntu-latest |
| 19 | + defaults: |
| 20 | + run: |
| 21 | + shell: bash -l {0} |
| 22 | + steps: |
| 23 | + - uses: actions/checkout@v2 |
| 24 | + - name: Cache conda |
| 25 | + uses: actions/cache@v3 |
| 26 | + env: |
| 27 | + # Increase this value to reset cache if environment-test.yml has not changed |
| 28 | + CACHE_NUMBER: 0 |
| 29 | + with: |
| 30 | + path: ~/conda_pkgs_dir |
| 31 | + key: ${{ runner.os }}-py39-conda-${{ env.CACHE_NUMBER }}-${{ |
| 32 | + hashFiles('conda-envs/environment-test.yml') }} |
| 33 | + - name: Cache multiple paths |
| 34 | + uses: actions/cache@v3 |
| 35 | + env: |
| 36 | + # Increase this value to reset cache if requirements.txt has not changed |
| 37 | + CACHE_NUMBER: 0 |
| 38 | + with: |
| 39 | + path: | |
| 40 | + ~/.cache/pip |
| 41 | + $RUNNER_TOOL_CACHE/Python/* |
| 42 | + ~\AppData\Local\pip\Cache |
| 43 | + key: ${{ runner.os }}-build-${{ matrix.python-version }}-${{ env.CACHE_NUMBER }}-${{ |
| 44 | + hashFiles('requirements.txt') }} |
| 45 | + - uses: conda-incubator/setup-miniconda@v2 |
| 46 | + with: |
| 47 | + miniforge-variant: Mambaforge |
| 48 | + miniforge-version: latest |
| 49 | + mamba-version: "*" |
| 50 | + activate-environment: pymc-test |
| 51 | + channel-priority: strict |
| 52 | + environment-file: conda-envs/environment-test.yml |
| 53 | + python-version: 3.9 |
| 54 | + use-mamba: true |
| 55 | + use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly! |
| 56 | + - name: Install-pymc and mypy dependencies |
| 57 | + run: | |
| 58 | + conda activate pymc-test |
| 59 | + pip install -e . |
| 60 | + pip install --pre -U polyagamma |
| 61 | + pip install mypy types-cachetools |
| 62 | + python --version |
| 63 | + - name: Run mypy |
| 64 | + run: | |
| 65 | + conda activate pymc-test |
| 66 | + python ./scripts/run_mypy.py --verbose |
0 commit comments