Skip to content

Commit 0a7ae2b

Browse files
committed
Switch Python CI workflow to use uv
Replace `actions/setup-python` with `astral-sh/setup-uv` and use `uv run` to run tests. Co-Authored-By: HAL 9000
1 parent 0da793e commit 0a7ae2b

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

.github/workflows/python.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,15 @@ jobs:
1717
- name: Checkout repository
1818
uses: actions/checkout@v4
1919

20-
- name: Setup Python
21-
uses: actions/setup-python@v4
22-
with:
23-
python-version: '3.10'
20+
- name: Install uv
21+
uses: astral-sh/setup-uv@v7
2422

2523
- name: Generate Python bindings
2624
run: ./scripts/uniffi_bindgen_generate_python.sh
2725

2826
- name: Start bitcoind and electrs
2927
run: docker compose up -d
3028

31-
- name: Install testing prerequisites
32-
run: |
33-
pip3 install requests
34-
3529
- name: Run Python unit tests
3630
env:
3731
BITCOIN_CLI_BIN: "docker exec ldk-node-bitcoin-1 bitcoin-cli"
@@ -40,4 +34,4 @@ jobs:
4034
ESPLORA_ENDPOINT: "http://127.0.0.1:3002"
4135
run: |
4236
cd $LDK_NODE_PYTHON_DIR
43-
python3 -m unittest discover -s src/ldk_node
37+
uv run --group dev python -m unittest discover -s src/ldk_node

bindings/python/pyproject.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ authors = [
99
{ name="Elias Rohrer", email="dev@tnull.de" },
1010
]
1111
description = "A ready-to-go Lightning node library built using LDK and BDK."
12-
readme = "README.md"
12+
readme = "../../README.md"
1313
requires-python = ">=3.8"
1414
classifiers = [
1515
"Topic :: Software Development :: Libraries",
@@ -24,5 +24,10 @@ classifiers = [
2424
"Github" = "https://github.com/lightningdevkit/ldk-node"
2525
"Bug Tracker" = "https://github.com/lightningdevkit/ldk-node/issues"
2626

27+
[dependency-groups]
28+
dev = ["requests"]
29+
2730
[tool.hatch.build.targets.wheel]
2831
packages = ["src/ldk_node"]
32+
33+
[tool.hatch.build.hooks.custom]

0 commit comments

Comments
 (0)