-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (65 loc) · 1.84 KB
/
ci.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: CI
on:
push:
branches: [main, develop]
tags:
- "*"
paths-ignore:
- "doc/**"
- ".vscode/**"
pull_request:
branches: [main, develop]
paths-ignore:
- "doc/**"
- ".vscode/**"
env:
CI: true
UV_SYSTEM_PYTHON: 1
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
with:
lfs: false
- name: Create LFS file list
run: git lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id
- name: Cache git LFS
uses: actions/cache@v4
with:
path: .git/lfs
key: git-lfs-v1-${{ matrix.python-version }}-${{ hashFiles('.lfs-assets-id') }}
restore-keys: |
git-lfs-v1-${{ matrix.python-version }}
git-lfs-v1
git-lfs
- name: Git LFS
run: |
git lfs checkout
git lfs pull
git lfs prune --verify-remote
- name: Install uv
uses: astral-sh/setup-uv@v4
with:
enable-cache: true
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
uv sync --frozen --all-extras
- name: Test with pytest
run: |
uv run pytest -vv -n=auto --durations=25 --cov-report html --cov-config pyproject.toml roseau
env:
ROSEAU_LOAD_FLOW_LICENSE_KEY: ${{ secrets.ROSEAU_LOAD_FLOW_LICENSE_KEY }}
- name: Archive code coverage results
uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: code-coverage-report-${{ runner.os }}-python-${{ matrix.python-version }}
path: htmlcov/