Manually activate env each step #78
This file contains hidden or 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
| name: Lint and Test | |
| on: | |
| push: | |
| paths: | |
| - '**.py' | |
| - 'environments/*.yml' | |
| - '.github/workflows/test.yml' | |
| jobs: | |
| test: | |
| strategy: | |
| matrix: | |
| os: [windows, macos] | |
| runs-on: ${{ matrix.os }}-latest | |
| defaults: | |
| run: | |
| shell: bash -l {0} | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Activate Anaconda Environment | |
| uses: conda-incubator/setup-miniconda@v2 | |
| with: | |
| python-version: 3.13 | |
| miniconda-version: latest | |
| auto-activate-base: false | |
| - name: Build Environment | |
| run: | | |
| conda create -n tactool python=3.13 | |
| conda activate tactool | |
| pip install -e ".[test]" | |
| - name: Lint | |
| run: | | |
| conda activate tactool | |
| flake8 | |
| - name: Test | |
| run: | | |
| conda activate tactool | |
| export PYTHONPATH=. | |
| pytest -vvs test/ |