Skip to content

Commit 6db45a0

Browse files
committed
adjusted github actions to uv + updated Py versions
1 parent d9d8486 commit 6db45a0

File tree

3 files changed

+32
-28
lines changed

3 files changed

+32
-28
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
max-parallel: 4
1919
matrix:
2020
os: [ubuntu-latest, macos-latest]
21-
python: ['3.8', '3.10', '3.11']
21+
python: ['3.9', '3.10', '3.11', '3.12', '3.13']
2222
test_server: [false]
2323
include:
2424
- os: macos-latest
@@ -31,36 +31,33 @@ jobs:
3131
- uses: actions/checkout@v4
3232
with:
3333
fetch-depth: 0
34-
- name: Set up Python ${{ matrix.python }}
35-
uses: actions/setup-python@v5
36-
with:
37-
python-version: ${{ matrix.python }}
3834

39-
- name: Get pip cache dir
40-
id: pip-cache
41-
run: |
42-
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
43-
- name: Cache pip
44-
uses: actions/cache@v4
35+
- name: Install uv
36+
uses: astral-sh/setup-uv@v5
4537
with:
46-
path: ${{ steps.pip-cache.outputs.dir }}
47-
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
38+
enable-cache: true
39+
40+
- name: Set up Python ${{ matrix.python }}
41+
run: uv python install ${{ matrix.python-version }}
42+
4843
- name: Install dependencies
4944
run: |
50-
python -m pip install --upgrade pip
51-
pip install tox tox-gh-actions codecov
45+
uv sync --all-extras
46+
uv pip install tox-gh-actions codecov
5247
5348
- name: Install R
5449
if: matrix.test_server
5550
uses: r-lib/actions/setup-r@v2
5651
with:
5752
r-version: 4.4.1
53+
5854
- name: Get R cache dir
5955
uses: actions/cache@v4
6056
if: matrix.test_server
6157
with:
6258
path: ~/.local/share/renv
6359
key: ${{ runner.os }}-renv-${{ hashFiles('**/renv.lock') }}
60+
6461
- name: Install OmnipathR
6562
if: matrix.test_server
6663
run: |
@@ -72,28 +69,27 @@ jobs:
7269
env:
7370
PLATFORM: ${{ matrix.platform }}
7471
run: |
75-
tox -vv
72+
uv run tox -vv
7673
7774
- name: Upload coverage to Codecov
7875
if: success()
7976
env:
8077
CODECOV_NAME: ${{ matrix.python }}-${{ matrix.os }}
8178
run: |
82-
codecov --no-color --required --flags unittests
79+
uv run codecov --no-color --required --flags unittests
8380
8481
deploy:
8582
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
8683
needs: build
8784
runs-on: ubuntu-latest
8885
steps:
86+
8987
- uses: actions/checkout@v3
9088
with:
9189
fetch-depth: 0
9290

93-
- name: Install dependencies
94-
run: pip install build
9591
- name: Build a binary wheel and a source tarball
96-
run: python -m build --sdist --wheel --outdir dist/
92+
run: uv build
9793

9894
- name: Publish package on PyPI
9995
uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/lint.yml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,28 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- uses: actions/checkout@v4
16-
- name: Set up Python 3.11
16+
- name: Set up Python 3.13
1717
uses: actions/setup-python@v5
1818
with:
19-
python-version: '3.11'
19+
python-version: '3.13'
2020

21-
- uses: actions/cache@v4
21+
- name: Install uv
22+
uses: astral-sh/setup-uv@v5
2223
with:
23-
path: ~/.cache/pre-commit
24-
key: precommit-${{ env.pythonLocation }}-${{ hashFiles('**/.pre-commit-config.yaml') }}
24+
enable-cache: true
25+
26+
- name: Set up Python ${{ matrix.python }}
27+
run: uv python install ${{ matrix.python-version }}
2528

2629
- name: Install dependencies
2730
run: |
28-
python -m pip install --upgrade pip
29-
pip install tox
31+
uv sync --all-extras
32+
33+
- uses: actions/cache@v4
34+
with:
35+
path: ~/.cache/pre-commit
36+
key: precommit-${{ env.pythonLocation }}-${{ hashFiles('**/.pre-commit-config.yaml') }}
3037

3138
- name: Lint
3239
run: |
33-
tox -e lint
40+
uv run tox -e lint

tox.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ python =
2727
3.10: py310
2828
3.11: py311
2929
3.12: py312
30+
3.13: py313
3031

3132
[gh-actions:env]
3233
PLATFORM =

0 commit comments

Comments
 (0)