Merge pull request #89 from ks905383/dependabot/github_actions/codeco… #295
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: Tests | |
on: [push, pull_request] | |
jobs: | |
build: | |
name: Build (${{ matrix.python-version }} | ${{ matrix.os }}) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["ubuntu-latest"] | |
python-version: ["3.9", "3.10", "3.11", "3.12", "3.12.noxesmf","3.12.plotfuncs"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Create conda environment | |
uses: mamba-org/setup-micromamba@v2 | |
with: | |
cache-downloads: true | |
cache-environment: true | |
micromamba-version: 'latest' | |
#mamba-version: "*" # activate this to build with mamba. | |
channels: conda-forge #, defaults # These need to be specified to use mamba | |
channel-priority: true | |
environment-file: ci/environment-py${{ matrix.python-version }}.yml | |
- name: Set up conda environment | |
shell: bash -l {0} | |
run: | | |
python -m pip install -e . --no-deps --force-reinstall | |
- name: Run Tests | |
shell: bash -l {0} | |
run: | | |
pytest --cov=./ --cov-report=xml | |
- name: Upload code coverage to Codecov | |
uses: codecov/codecov-action@v5 | |
with: | |
file: ./coverage.xml | |
token: ${{ secrets.CODECOV_TOKEN }} | |
flags: unittests | |
env_vars: OS,PYTHON | |
name: codecov-umbrella | |
fail_ci_if_error: false |