build(environment): support 3.12 #126
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
on: | |
# run on all pushes to any branch | |
push: | |
paths: | |
# Only run on changes to source or test python files and environment.yml | |
- "fractopo/**.py" | |
- "tests/**.py" | |
- ".github/workflows/**.yaml" | |
- "pyproject.toml" | |
- "environment.yaml" | |
jobs: | |
conda-environment-install: | |
timeout-minutes: 30 | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.9", "3.10", "3.11", "3.12"] | |
platform: ["ubuntu-latest", "macos-latest", "windows-latest"] | |
runs-on: ${{ matrix.platform }} | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: mamba-org/setup-micromamba@v2 | |
with: | |
micromamba-version: "1.5.6-0" | |
environment-file: environment.yaml | |
init-shell: >- | |
bash | |
powershell | |
cache-environment: true | |
post-cleanup: "all" | |
create-args: >- | |
python=${{ matrix.python-version }} | |
- name: Run unit tests | |
run: | | |
# Test package import | |
python -c 'import fractopo' | |
# Test module entrypoint | |
python -m fractopo --help | |
# Run unittests with pytest | |
pytest -v |