Skip to content

Commit 3fbc10d

Browse files
authored
Use dependency groups in CI (#1440)
* Use dependency groups in CI * Trying a newer setup-tools * Fix coverage * testinfra -> releaseinfra * Pip 25.1 arrives by default on GitHub
1 parent 5a0f6b7 commit 3fbc10d

File tree

5 files changed

+25
-15
lines changed

5 files changed

+25
-15
lines changed

.github/workflows/docs_dev.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ jobs:
2121
python-version: '3.10'
2222
- name: Install dependencies
2323
run: |
24-
python -m pip install --upgrade pip
25-
pip install -U virtualenv setuptools wheel nox
24+
pip install -U --group testinfra
2625
sudo apt-get install graphviz pandoc
2726
- name: Build docs
2827
run: |

.github/workflows/docs_release.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ jobs:
2222
python-version: '3.10'
2323
- name: Install dependencies
2424
run: |
25-
python -m pip install --upgrade pip
26-
pip install -U virtualenv setuptools wheel nox
25+
pip install -U --group testinfra
2726
sudo apt-get install graphviz pandoc
2827
- name: Build docs
2928
run: |

.github/workflows/main.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ jobs:
2626
- uses: actions/setup-python@v5
2727
with:
2828
python-version: "3.10"
29-
- run: pip install -U ruff==0.6.8 black~=24.8
29+
- run: |
30+
pip install -U --group lint
3031
- uses: dtolnay/rust-toolchain@stable
3132
with:
3233
components: rustfmt, clippy
@@ -96,7 +97,8 @@ jobs:
9697
toolchain: ${{ matrix.rust }}
9798
targets: ${{ matrix.platform.rust-target }}
9899
- name: 'Install dependencies'
99-
run: python -m pip install --upgrade nox
100+
run: |
101+
python -m pip install -U --group testinfra
100102
- name: 'Install binary dependencies'
101103
run: sudo apt-get install -y graphviz
102104
if: runner.os == 'Linux'
@@ -120,7 +122,8 @@ jobs:
120122
- name: Install Rust toolchain
121123
uses: dtolnay/rust-toolchain@stable
122124
- name: 'Install dependencies'
123-
run: python -m pip install --upgrade nox
125+
run: |
126+
python -m pip install -U --group testinfra
124127
- name: 'Run rustworkx stub tests'
125128
run: nox -estubs
126129
coverage:
@@ -141,10 +144,12 @@ jobs:
141144
- name: Download grcov
142145
run: curl -L https://github.com/mozilla/grcov/releases/download/v0.8.7/grcov-x86_64-unknown-linux-gnu.tar.bz2 | tar jxf -
143146
- name: Install deps
144-
run: pip install -U setuptools setuptools-rust networkx testtools fixtures stestr
147+
run: |
148+
pip install -U --group test
145149
- name: Build rustworkx
146-
run: python setup.py develop
150+
run: pip install .
147151
env:
152+
SETUPTOOLS_RUST_CARGO_PROFILE: "dev"
148153
CARGO_INCREMENTAL: 0
149154
RUSTFLAGS: "-Cinstrument-coverage"
150155
LLVM_PROFILE_FILE: "rustworkx-%p-%m.profraw"
@@ -185,7 +190,8 @@ jobs:
185190
- name: Install binary deps
186191
run: sudo apt-get install -y graphviz
187192
- name: Install deps
188-
run: pip install -U nox
193+
run: |
194+
pip install -U --group testinfra
189195
- name: Build Docs
190196
run: nox -e docs
191197
- uses: actions/upload-artifact@v4

.github/workflows/wheels.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
- uses: dtolnay/rust-toolchain@stable
5858
- name: Install cibuildwheel
5959
run: |
60-
python -m pip install cibuildwheel==2.23.2
60+
python -m pip install -U --group releaseinfra
6161
- name: Build wheels
6262
run: |
6363
python -m cibuildwheel --output-dir wheelhouse
@@ -105,7 +105,7 @@ jobs:
105105
platforms: all
106106
- name: Install cibuildwheel
107107
run: |
108-
python -m pip install cibuildwheel==2.23.2
108+
python -m pip install -U --group releaseinfra
109109
- name: Build wheels
110110
run: |
111111
python -m cibuildwheel --output-dir wheelhouse
@@ -143,7 +143,7 @@ jobs:
143143
platforms: all
144144
- name: Install cibuildwheel
145145
run: |
146-
python -m pip install cibuildwheel==2.23.2
146+
python -m pip install -U --group releaseinfra
147147
- name: Build wheels
148148
run: |
149149
python -m cibuildwheel --output-dir wheelhouse
@@ -176,7 +176,7 @@ jobs:
176176
run: rustup default stable-i686-pc-windows-msvc
177177
- name: Install cibuildwheel
178178
run: |
179-
python -m pip install cibuildwheel==2.23.2
179+
python -m pip install -U --group releaseinfra
180180
- name: Build wheels
181181
run: |
182182
python -m cibuildwheel --output-dir wheelhouse

pyproject.toml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,13 @@ name = "Ivan Carvalho"
6363
6464

6565
[build-system]
66-
requires = ["setuptools>=70.1.0", "setuptools-rust>=1.9"]
66+
requires = ["setuptools>=77.0.0", "setuptools-rust>=1.9"]
6767
build-backend = "setuptools.build_meta"
6868

6969
[dependency-groups]
70+
testinfra = [
71+
"nox==2025.5.1",
72+
]
7073
test = [
7174
"setuptools-rust",
7275
"fixtures",
@@ -97,6 +100,9 @@ docs = [
97100
"sphinxemoji",
98101
"ipykernel",
99102
]
103+
releaseinfra = [
104+
"cibuildwheel==2.23.2",
105+
]
100106

101107
[tool.black]
102108
line-length = 100

0 commit comments

Comments
 (0)