Skip to content

Implement more consistent logging behavior with ixmp4 #986

Implement more consistent logging behavior with ixmp4

Implement more consistent logging behavior with ixmp4 #986

Workflow file for this run

# This workflow installs the package on several OS/Python versions and runs the tests
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: pytest
on:
push:
branches: [ 'main' ]
pull_request:
branches: [ '**' ]
jobs:
pytest:
strategy:
matrix:
os:
- macos-latest
- ubuntu-latest
- windows-latest
python-version:
- '3.10'
- '3.11'
- '3.12'
fail-fast: false
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} py${{ matrix.python-version }}
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies and package
run: pip install .[tests,optional_plotting,optional_io_formats,tutorials]
# run tests without Matplotlib & CodeCode tests on earlier Python versions
- name: Test with pytest
if: ${{ matrix.python-version != '3.12' }}
run: pytest tests
# run tests with Matplotlib & CodeCov on latest Python version
- name: Test with pytest including Matplotlib & Codecov
if: ${{ matrix.python-version == '3.12' }}
run: pytest tests --mpl --cov=./ --cov-report=xml
- name: Upload coverage report to Codecov
if: ${{ matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12' }}
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
env_vars: ${{ matrix.os }} py${{ matrix.python-version }}