Ribasim Python: Add-API #1914
Workflow file for this run
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: Ribasim Python Tests | |
on: | |
push: | |
branches: [main, update/pixi-lock] | |
paths-ignore: [".teamcity/**"] | |
tags: ["*"] | |
pull_request: | |
merge_group: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
name: Python ${{ matrix.python-version }} - ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
- macOS-latest | |
- windows-latest | |
python-version: | |
- "3.10" | |
- "3.11" | |
- "3.12" | |
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 test dependencies | |
run: | | |
pip install --editable "python/ribasim_testmodels" | |
pip install --editable "python/ribasim[tests]" | |
- name: Run tests | |
run: pytest --numprocesses=auto --cov=ribasim --cov-report=xml python/ribasim/tests | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} |