]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
ci: teach manual test workflow to run several tests
authorLaszlo Gombos <laszlo.gombos@gmail.com>
Wed, 23 Nov 2022 04:51:37 +0000 (04:51 +0000)
committerAntonio Álvarez Feijoo <antonio.feijoo@suse.com>
Mon, 5 Dec 2022 09:44:45 +0000 (10:44 +0100)
Timesaver for running tests during development and reviews.

.github/workflows/manualtest.yml

index 1689817ed14e82bf014fb99ee8103da7740a8b7a..9a64b9e7ddc8920ff972c478ccc8a064138f2dd9 100644 (file)
@@ -4,8 +4,8 @@ on:
     workflow_dispatch:
         inputs:
             test:
-                description: 'Test to run'
-                default: '04'
+                description: "Array of tests to run, such as [11,12]"
+                default: "['04']"
                 required: true
             container:
                 type: choice
@@ -22,6 +22,9 @@ jobs:
     test:
         runs-on: ubuntu-latest
         timeout-minutes: 45
+        strategy:
+            matrix:
+                test: ${{ fromJSON(inputs.test) }}
         container:
             image: ghcr.io/dracutdevs/${{ inputs.container }}
             options: "--privileged -v /dev:/dev"
@@ -30,6 +33,5 @@ jobs:
                 uses: actions/checkout@v1
                 with:
                     fetch-depth: 0
-
-            -   name: "${{ inputs.container }} TEST-${{ inputs.test }}"
-                run: ./tools/test-github.sh "TEST-${{ inputs.test }}" ${{ inputs.test }}
+            -   name: "${{ inputs.container }} ${{ matrix.test }}"
+                run: ./tools/test-github.sh "TEST-${{ matrix.test }}" ${{ matrix.test }}