Merge pull request #73 from MasayukiMotoori/bugfix-branch #386
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
name: Testing With Conda | |
on: | |
push: | |
branches: | |
- '*' | |
pull_request: | |
branches: | |
- '*' | |
jobs: | |
build_and_test: | |
name: Testing (${{ matrix.python-version }}, ${{ matrix.os }}) | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
shell: bash -l {0} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["ubuntu-latest"] | |
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup environment | |
uses: mamba-org/setup-micromamba@v1 | |
with: | |
environment-name: geoana-test | |
create-args: >- | |
python=${{ matrix.python-version }} | |
numpy>=1.20 | |
scipy>=1.8 | |
libdlf | |
cython | |
setuptools_scm | |
meson-python>=0.14.0 | |
meson | |
ninja | |
build | |
discretize | |
matplotlib | |
jupyter | |
utm | |
pytest | |
pytest-cov | |
sphinx | |
sphinx-gallery>=0.1.13 | |
pydata-sphinx-theme=0.13.3 | |
numpydoc>=1.5 | |
graphviz | |
pillow | |
cache-environment: true | |
- name: Install numba | |
if: matrix.python-version != '3.12' | |
# Numba doesn't work on python 3.12 just yet, so conditionally install it into the environment: | |
run: | | |
micromamba install numba | |
- name: Install Our Package | |
run: | | |
pip install --no-build-isolation --editable . --config-settings=setup-args="-Dwith_extensions=true" | |
conda list | |
- name: Run Tests | |
run: | | |
pytest --cov-config=.coveragerc --cov=geoana --cov-report=xml -s -v -W ignore::DeprecationWarning | |
- name: "Upload coverage to Codecov" | |
if: matrix.python-version == '3.11' | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
fail_ci_if_error: true |