Skip to content

Commit 3dd6ca7

Browse files
committed
btrfs-progs: ci: add libbtrfsutil python bindings coverage
Run the python tests in CI, coverage is still not complete due to various problems in the python version support. The claimed minimum version is still 3.6, while tested minimum is 3.9. Signed-off-by: David Sterba <dsterba@suse.com>
1 parent 77b0a91 commit 3dd6ca7

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.github/workflows/python.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Run python tests on various version
2+
#
3+
# NOTE: The minimum compatible version is 3.6 but the CI base image does not provide it.
4+
# NOTE: The recent python versions (3.12 and up) fail to set up due to old python3-setuptools in the image
5+
# NOTE: The workflow could still pass even if the individual tests fail (FIXME)
6+
7+
name: Python bindings tests
8+
run-name: Python bindings tests
9+
on:
10+
push:
11+
branches:
12+
- "ci/**"
13+
- devel
14+
- release-test
15+
- master
16+
jobs:
17+
python-test:
18+
runs-on: ubuntu-latest
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
# 3.6 not available since 22.04
23+
# 3.12 broken on 24.04 (no setuptools found during build despite being installed, FIXME)
24+
# 3.13 not available on 24.04
25+
python-version: ["3.9", "3.10", "3.11"]
26+
steps:
27+
- uses: actions/checkout@v4
28+
- run: sudo apt-get update -qqq
29+
- run: sudo apt-get install -y pkg-config gcc liblzo2-dev libzstd-dev libblkid-dev uuid-dev zlib1g-dev libext2fs-dev e2fsprogs libudev-dev python3-sphinx libaio-dev liburing-dev python3-setuptools
30+
- name: Set up python
31+
uses: actions/setup-python@v6
32+
with:
33+
python-version: ${{ matrix.python-version }}
34+
- run: python -c "import sys; print(sys.version)"
35+
- name: Configure
36+
run: ./autogen.sh && ./configure --disable-documentation --disable-programs --disable-static
37+
- name: Make
38+
# With --disable-programs most of the tools are not built, but the tests still need mkfs
39+
run: make V=1 -j 4 all mkfs.btrfs
40+
- name: Test python
41+
run: sudo make test-libbtrfsutil

0 commit comments

Comments
 (0)