Skip to content

Commit c9a9dc1

Browse files
committed
everything except tox
1 parent 4b1a2e6 commit c9a9dc1

4 files changed

Lines changed: 28 additions & 52 deletions

File tree

.github/workflows/build.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,13 @@ jobs:
1414
package:
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: actions/checkout@v3
18-
- name: Set up Python 3.10
19-
uses: actions/setup-python@v4
17+
- uses: actions/checkout@v5
18+
- name: Set up Python 3.12
19+
uses: astral-sh/setup-uv@v6
2020
with:
21-
python-version: "3.10"
22-
cache: "pip"
23-
cache-dependency-path: "**/pyproject.toml"
24-
- name: Install build dependencies
25-
run: python -m pip install --upgrade pip wheel twine build
21+
python-version: "3.12"
22+
enable-cache: true
2623
- name: Build package
27-
run: python -m build
24+
run: uvx hatch build
2825
- name: Check package
29-
run: twine check --strict dist/*.whl
26+
run: uvx twine check --strict dist/*.whl

.github/workflows/deployment.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,18 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- name: Checkout code
20-
uses: actions/checkout@v3
20+
uses: actions/checkout@v5
2121
with:
2222
fetch-depth: 0
2323

24-
- name: Set up Python 3.10
25-
uses: actions/setup-python@v4
24+
- name: Set up Python 3.12
25+
uses: astral-sh/setup-uv@v6
2626
with:
27-
python-version: "3.10"
28-
29-
- name: Install hatch
30-
run: pip install hatch
27+
python-version: "3.12"
3128

3229
# this will fail if the last commit is not tagged
3330
- name: Build project for distribution
34-
run: hatch build
31+
run: uvx hatch build
3532

3633
- name: Publish on PyPI
3734
uses: pypa/gh-action-pypi-publish@release/v1
@@ -46,14 +43,14 @@ jobs:
4643
needs: deploy
4744
runs-on: ubuntu-latest
4845
steps:
49-
- uses: actions/checkout@v3
46+
- uses: actions/checkout@v5
5047
- name: Extract branch name
5148
id: vars
5249
run: |
5350
echo ::set-output name=branch::${GITHUB_REF#refs/*/}
5451
5552
- name: Merge release into main
56-
uses: everlytic/branch-merge@1.1.2
53+
uses: everlytic/branch-merge@1.1.5
5754
with:
5855
github_token: ${{ secrets.RELEASE_DISPATCH_TOKEN }}
5956
target_branch: main

.github/workflows/release.yml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,16 @@ jobs:
99
runs-on: ubuntu-latest
1010
if: startsWith(github.ref, 'refs/tags/v')
1111
steps:
12-
- uses: actions/checkout@v3
12+
- uses: actions/checkout@v5
1313
- name: Set up Python 3.12
14-
uses: actions/setup-python@v5
14+
uses: astral-sh/setup-uv@v6
1515
with:
1616
python-version: "3.12"
17-
cache: pip
18-
- name: Install build dependencies
19-
run: python -m pip install --upgrade pip wheel twine build
17+
enable-cache: true
2018
- name: Build package
21-
run: python -m build
19+
run: uvx hatch build
2220
- name: Check package
23-
run: twine check --strict dist/*.whl
24-
- name: Install hatch
25-
run: pip install hatch
26-
- name: Build project for distribution
27-
run: hatch build
21+
run: uvx twine check --strict dist/*.whl
2822
- name: Publish a Python distribution to PyPI
2923
uses: pypa/gh-action-pypi-publish@release/v1
3024
with:

.github/workflows/test.yml

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -33,37 +33,25 @@ jobs:
3333
PYTHON: ${{ matrix.python }}
3434

3535
steps:
36-
- uses: actions/checkout@v3
36+
- uses: actions/checkout@v5
3737
- name: Set up Python ${{ matrix.python }}
38-
uses: actions/setup-python@v5
38+
uses: astral-sh/setup-uv@v6
3939
with:
4040
python-version: ${{ matrix.python }}
41-
42-
- name: Get pip cache dir
43-
id: pip-cache-dir
44-
run: |
45-
echo "::set-output name=dir::$(pip cache dir)"
46-
47-
- name: Restore pip cache
48-
uses: actions/cache@v3
49-
with:
50-
path: ${{ steps.pip-cache-dir.outputs.dir }}
51-
key: pip-${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('**/requirements.txt') }}
52-
restore-keys: |
53-
pip-${{ runner.os }}-${{ env.pythonLocation }}-
41+
enable-cache: true
42+
activate-environment: true
5443

5544
- name: Install dependencies
5645
run: |
5746
./.scripts/ci/install_dependencies.sh
5847
5948
- name: Install pip dependencies
6049
run: |
61-
python -m pip install --upgrade pip
62-
pip install tox tox-gh-actions
50+
uv pip install tox tox-gh-actions
6351
6452
- name: Restore data cache
6553
id: data-cache
66-
uses: actions/cache@v3
54+
uses: actions/cache@v4
6755
with:
6856
path: |
6957
~/.cache/squidpy/*.h5ad
@@ -77,10 +65,10 @@ jobs:
7765
# caching .tox is not encouraged, but since we're private and this shaves off ~1min from the step
7866
# if any problems occur and/or once the package is public, this can be removed
7967
- name: Restore tox cache
80-
uses: actions/cache@v3
68+
uses: actions/cache@v4
8169
with:
8270
path: .tox
83-
key: tox-${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('**/requirements.txt', '**/tox.ini') }}
71+
key: tox-${{ runner.os }}-${{ matrix.python }}-${{ hashFiles('**/requirements.txt', '**/tox.ini') }}
8472

8573
- name: Test
8674
timeout-minutes: 60
@@ -103,7 +91,7 @@ jobs:
10391
path: /home/runner/work/squidpy/squidpy/tests/figures/*
10492

10593
- name: Upload coverage to Codecov
106-
uses: codecov/codecov-action@v4
94+
uses: codecov/codecov-action@v5
10795
with:
10896
name: coverage
10997
verbose: true

0 commit comments

Comments
 (0)