Merge pull request #174 from NoraLoose/n-steps #585
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: | |
branches: | |
- "master" | |
pull_request: | |
branches: | |
- "*" | |
schedule: | |
- cron: "0 13 * * 1" | |
jobs: | |
build: | |
name: Build (${{ matrix.python-version }} | ${{ matrix.os }}) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["ubuntu-latest"] | |
python-version: ["3.10", "3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Create conda environment | |
uses: mamba-org/setup-micromamba@v1 | |
with: | |
cache-downloads: true | |
cache-environment: true | |
micromamba-version: 'latest' | |
environment-file: ci/environment.yml | |
create-args: | | |
python=${{ matrix.python-version }} | |
cache-key: micromamba-${{ matrix.python-version }}-${{ runner.os }} | |
- name: Conda info | |
run: conda info | |
- name: Install gcm-filters | |
shell: micromamba-shell {0} | |
run: | | |
python -V | |
python -m pip install -e . --force-reinstall | |
- name: Run Tests | |
shell: bash -l {0} | |
run: | | |
python -V | |
coverage run --rcfile=coverage.toml -m pytest --verbose tests/* | |
- name: Get coverage report | |
shell: bash -l {0} | |
run: | | |
coverage report -m | |
coverage xml | |
- name: Upload code coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
file: ./coverage.xml | |
flags: unittests | |
fail_ci_if_error: false |