-
Notifications
You must be signed in to change notification settings - Fork 5
54 lines (49 loc) · 1.32 KB
/
python_tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Ribasim Python Tests
on:
push:
branches: [main]
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 }} - ${{ matrix.arch }}
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macOS-latest
- windows-latest
python_version:
- "3.9"
- "3.10"
- "3.11"
arch:
- x86
steps:
- uses: actions/checkout@v4
- name: Setup Micromamba
uses: mamba-org/setup-micromamba@v1
with:
cache-downloads: true
cache-environment: true
environment-file: ./environment.yml
create-args: >-
python=${{ matrix.python_version }}
- name: Install ribasim
run: pip install --editable python/ribasim
- name: Install ribasim_testmodels
run: pip install --editable python/ribasim_testmodels
- name: Run tests
run: pytest --cov=ribasim --cov-report=xml python/ribasim/tests
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3