]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
CI: Stop on first test failure
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 28 Jul 2022 14:00:26 +0000 (16:00 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 28 Jul 2022 18:20:01 +0000 (20:20 +0200)
When one test fails, usually all of them fail, which makes the
output hard to digest, so let's configure pytest to stop on the
first test failure.

.github/workflows/ci.yml

index 3863afa7722fb67942acfe002de0f182d70ac169..3b0f4b9df32bed802b3ff352d6ea3c6e315fc247 100644 (file)
@@ -182,7 +182,7 @@ jobs:
         sync-uri = https://raw.githubusercontent.com/257/binpkgs/main
         EOF
 
-        sudo MKOSI_TEST_DEFAULT_VERB=boot python3 -m pytest -m integration -sv tests
+        sudo MKOSI_TEST_DEFAULT_VERB=boot python3 -m pytest --exitfirst -m integration -sv tests
 
     - name: Build ${{ matrix.distro }}/${{ matrix.format }} UsrOnly
       run: |
@@ -203,7 +203,7 @@ jobs:
         QemuBoot=uefi
         EOF
 
-        sudo MKOSI_TEST_DEFAULT_VERB=qemu python3 -m pytest -m integration -sv tests
+        sudo MKOSI_TEST_DEFAULT_VERB=qemu python3 -m pytest --exitfirst -m integration -sv tests
 
     - name: Build/Boot ${{ matrix.distro }}/${{ matrix.format }} UEFI
       run: |
@@ -216,7 +216,7 @@ jobs:
         QemuBoot=uefi
         EOF
 
-        sudo MKOSI_TEST_DEFAULT_VERB=qemu python3 -m pytest -m integration -sv tests
+        sudo MKOSI_TEST_DEFAULT_VERB=qemu python3 -m pytest --exitfirst -m integration -sv tests
 
     - name: Build/Boot ${{ matrix.distro }}/${{ matrix.format }} BIOS
       run: |
@@ -229,7 +229,7 @@ jobs:
         QemuBoot=bios
         EOF
 
-        sudo MKOSI_TEST_DEFAULT_VERB=qemu python3 -m pytest -m integration -sv tests
+        sudo MKOSI_TEST_DEFAULT_VERB=qemu python3 -m pytest --exitfirst -m integration -sv tests
 
     - name: Build/Boot ${{ matrix.distro }}/${{ matrix.format}} QEMU Linux Boot
       run: |
@@ -242,4 +242,4 @@ jobs:
         QemuBoot=linux
         EOF
 
-        sudo MKOSI_TEST_DEFAULT_VERB=qemu python3 -m pytest -m integration -sv tests
+        sudo MKOSI_TEST_DEFAULT_VERB=qemu python3 -m pytest --exitfirst -m integration -sv tests