88
99env :
1010 UV_NO_SYNC : 1
11- PYTHON_VERSION : 3.14
1211
1312jobs :
1413 tests-full-install :
@@ -19,36 +18,32 @@ jobs:
1918 matrix :
2019 python-version : ['3.10', '3.11', '3.12', '3.13', '3.14']
2120 os : [ubuntu-latest, macOS-latest, windows-latest]
22- env :
23- PYTHON_VERSION : ${{ matrix.python-version }} # Override the PYTHON_VERSION of the global env
2421
2522 steps :
26- - &checkout
27- name : Checkout repository
28- uses : actions/checkout@v4
29- - &setup-uv
30- name : Set up uv
31- uses : astral-sh/setup-uv@v5
23+ - uses : ./.github/actions/setup
3224 with :
33- python-version : ${{ env.PYTHON_VERSION }}
34- - name : Install default (with full options) and test dependencies
35- run : uv pip install -e '.[full]' --group test
25+ python-version : ${{ matrix.python-version }}
26+
27+ - uses : ./.github/actions/install-deps
28+ with :
29+ options : full
30+ groups : test
31+
3632 - name : Run unit and doc tests with coverage report
3733 run : uv run pytest -W error tests/unit tests/doc --cov=src --cov-report=xml
38- - &upload-codecov
39- name : Upload results to Codecov
40- uses : codecov/codecov-action@v4
41- with :
42- token : ${{ secrets.CODECOV_TOKEN }}
34+
35+ - uses : ./.github/actions/upload-codecov
4336
4437 tests-default-install :
4538 name : Run (most) tests with default install
4639 runs-on : ubuntu-latest
4740 steps :
48- - *checkout
49- - *setup-uv
50- - name : Install default (without any option) and test dependencies
51- run : uv pip install -e . --group test
41+ - uses : ./.github/actions/setup
42+
43+ - uses : ./.github/actions/install-deps
44+ with :
45+ groups : test
46+
5247 - name : Run unit and doc tests with coverage report
5348 run : |
5449 uv run pytest -W error tests/unit tests/doc \
@@ -57,30 +52,36 @@ jobs:
5752 --ignore tests/doc/test_aggregation.py \
5853 --cov=src --cov-report=xml
5954
60- - * upload-codecov
55+ - uses : ./.github/actions/ upload-codecov
6156
6257 tests-float64 :
6358 name : Run tests on float64 dtype
6459 runs-on : ubuntu-latest
6560 steps :
66- - *checkout
67- - *setup-uv
68- - name : Install default (with full options) and test dependencies
69- run : uv pip install -e '.[full]' --group test
61+ - uses : ./.github/actions/setup
62+
63+ - uses : ./.github/actions/install-deps
64+ with :
65+ options : full
66+ groups : test
67+
7068 - name : Run unit and doc tests with coverage report
7169 run : uv run pytest -W error tests/unit tests/doc --cov=src --cov-report=xml
7270 env :
7371 PYTEST_TORCH_DTYPE : float64
74- - *upload-codecov
72+
73+ - uses : ./.github/actions/upload-codecov
7574
7675 build-doc :
7776 name : Build doc
7877 runs-on : ubuntu-latest
7978 steps :
80- - *checkout
81- - *setup-uv
82- - name : Install dependencies (default with full options & doc)
83- run : uv pip install -e '.[full]' --group doc
79+ - uses : ./.github/actions/setup
80+
81+ - uses : ./.github/actions/install-deps
82+ with :
83+ options : full
84+ groups : doc
8485
8586 - name : Build Documentation
8687 working-directory : docs
@@ -90,11 +91,12 @@ jobs:
9091 name : Run mypy
9192 runs-on : ubuntu-latest
9293 steps :
93- - *checkout
94- - *setup-uv
94+ - uses : ./.github/actions/setup
9595
96- - name : Install dependencies (default with full options & check)
97- run : uv pip install -e '.[full]' --group check
96+ - uses : ./.github/actions/install-deps
97+ with :
98+ options : full
99+ groups : check
98100
99- - name : Run mypy
100- run : uv run mypy src/torchjd
101+ - name : Run mypy
102+ run : uv run mypy src/torchjd
0 commit comments