Skip to content

Commit 8134451

Browse files
committed
Enable pytest test runs on CI
This commit also fixes fixture issues that caused test failures.
1 parent a28fb27 commit 8134451

File tree

2 files changed

+37
-10
lines changed

2 files changed

+37
-10
lines changed

.github/workflows/pytest.yaml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,14 @@ jobs:
88
options: --privileged
99
steps:
1010
- uses: actions/checkout@v4
11-
- run: pacman --noconfirm -Syu python python-pip qemu gcc
12-
- run: python -m pip install --break-system-packages --upgrade pip
13-
- run: pip install --break-system-packages pytest
11+
- name: Prepare arch
12+
run: |
13+
pacman-key --init
14+
pacman --noconfirm -Sy archlinux-keyring
15+
pacman --noconfirm -Syyu
16+
pacman --noconfirm -Sy python-pip python-pyparted pkgconfig gcc
17+
- run: pip install --break-system-packages --upgrade pip
18+
- name: Install archinstall dependencies
19+
run: pip install --break-system-packages .[dev]
1420
- name: Test with pytest
15-
run: python -m pytest || exit 0
21+
run: pytest

tests/data/test_config.json

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,27 @@
1111
"partitions": [
1212
{
1313
"btrfs": [],
14+
"dev_path": null,
1415
"flags": [
1516
"boot"
1617
],
1718
"fs_type": "fat32",
1819
"size": {
19-
"sector_size": null,
20+
"sector_size": {
21+
"unit": "B",
22+
"value": 512
23+
},
2024
"unit": "MiB",
2125
"value": 512
2226
},
2327
"mount_options": [],
2428
"mountpoint": "/boot",
2529
"obj_id": "2c3fa2d5-2c79-4fab-86ec-22d0ea1543c0",
2630
"start": {
27-
"sector_size": null,
31+
"sector_size": {
32+
"unit": "B",
33+
"value": 512
34+
},
2835
"unit": "MiB",
2936
"value": 1
3037
},
@@ -33,18 +40,25 @@
3340
},
3441
{
3542
"btrfs": [],
43+
"dev_path": null,
3644
"flags": [],
3745
"fs_type": "ext4",
3846
"size": {
39-
"sector_size": null,
47+
"sector_size": {
48+
"unit": "B",
49+
"value": 512
50+
},
4051
"unit": "GiB",
4152
"value": 20
4253
},
4354
"mount_options": [],
4455
"mountpoint": "/",
4556
"obj_id": "3e7018a0-363b-4d05-ab83-8e82d13db208",
4657
"start": {
47-
"sector_size": null,
58+
"sector_size": {
59+
"unit": "B",
60+
"value": 512
61+
},
4862
"unit": "MiB",
4963
"value": 513
5064
},
@@ -53,18 +67,25 @@
5367
},
5468
{
5569
"btrfs": [],
70+
"dev_path": null,
5671
"flags": [],
5772
"fs_type": "ext4",
5873
"size": {
59-
"sector_size": null,
74+
"sector_size": {
75+
"unit": "B",
76+
"value": 512
77+
},
6078
"unit": "Percent",
6179
"value": 100
6280
},
6381
"mount_options": [],
6482
"mountpoint": "/home",
6583
"obj_id": "ce58b139-f041-4a06-94da-1f8bad775d3f",
6684
"start": {
67-
"sector_size": null,
85+
"sector_size": {
86+
"unit": "B",
87+
"value": 512
88+
},
6889
"unit": "GiB",
6990
"value": 20
7091
},

0 commit comments

Comments
 (0)