]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
ci: run all Fedora CI in a matrix
authorHarald Hoyer <harald@redhat.com>
Mon, 26 Apr 2021 09:31:20 +0000 (11:31 +0200)
committerHarald Hoyer <harald@hoyer.xyz>
Mon, 26 Apr 2021 10:48:27 +0000 (12:48 +0200)
Also automatically cancel it, if the PR is updated

.github/workflows/fedora-32.yml [deleted file]
.github/workflows/fedora-33.yml [deleted file]
.github/workflows/fedora-latest.yml [deleted file]
.github/workflows/fedora.yml [new file with mode: 0644]

diff --git a/.github/workflows/fedora-32.yml b/.github/workflows/fedora-32.yml
deleted file mode 100644 (file)
index ec04bbd..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-## The test container is created with https://github.com/dracutdevs/fedora-container
-
-name: Fedora-32
-
-on:
-  push:
-    branches:
-      - 'master'
-
-jobs:
-  test:
-    runs-on: ubuntu-latest
-    container:
-      image: quay.io/haraldh/dracut-fedora:32
-      options: "-v /dev/kvm:/dev/kvm"
-    timeout-minutes: 45
-    strategy:
-      matrix:
-        test: [
-          "01",
-          "02",
-          "03",
-          "04",
-          "10",
-          "11",
-          "12",
-          "13",
-          "14",
-          "15",
-          "17",
-          "20",
-          "21",
-          "30",
-          "31",
-          "35",
-          "36",
-          "40",
-          "41",
-          "98",
-        ]
-      fail-fast: false
-    steps:
-      - name: "Checkout Repository"
-        uses: actions/checkout@v2
-        with:
-          fetch-depth: 0
-
-      - name: "TEST-${{ matrix.test }}"
-        run: ./fedora-test-github.sh "TEST-${{ matrix.test }}" ${{ matrix.test }}
diff --git a/.github/workflows/fedora-33.yml b/.github/workflows/fedora-33.yml
deleted file mode 100644 (file)
index a13c7ce..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-## The test container is created with https://github.com/dracutdevs/fedora-container
-
-name: Fedora-33
-
-on:
-  push:
-    branches:
-      - 'master'
-  pull_request:
-
-jobs:
-  test:
-    runs-on: ubuntu-latest
-    container:
-      image: quay.io/haraldh/dracut-fedora:33
-      options: "-v /dev/kvm:/dev/kvm"
-    timeout-minutes: 45
-    strategy:
-      matrix:
-        test: [
-          "01",
-          "02",
-          "03",
-          "04",
-          "10",
-          "11",
-          "12",
-          "13",
-          "14",
-          "15",
-          "17",
-          "20",
-          "21",
-          "30",
-          "31",
-          "35",
-          "36",
-          "40",
-          "41",
-          "98",
-        ]
-      fail-fast: false
-    steps:
-      - name: "Checkout Repository"
-        uses: actions/checkout@v2
-        with:
-          fetch-depth: 0
-
-      - name: "TEST-${{ matrix.test }}"
-        run: ./fedora-test-github.sh "TEST-${{ matrix.test }}" ${{ matrix.test }}
diff --git a/.github/workflows/fedora-latest.yml b/.github/workflows/fedora-latest.yml
deleted file mode 100644 (file)
index 28806cd..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-## The test container is created with https://github.com/dracutdevs/fedora-container
-
-name: Fedora-latest
-
-on:
-  push:
-    branches:
-      - 'master'
-
-jobs:
-  test:
-    runs-on: ubuntu-latest
-    container:
-      image: quay.io/haraldh/dracut-fedora:latest
-      options: "-v /dev/kvm:/dev/kvm"
-    timeout-minutes: 45
-    strategy:
-      matrix:
-        test: [
-          "01",
-          "02",
-          "03",
-          "04",
-          "10",
-          "11",
-          "12",
-          "13",
-          "14",
-          "15",
-          "17",
-          "20",
-          "21",
-          "30",
-          "31",
-          "35",
-          "36",
-          "40",
-          "41",
-          "98",
-        ]
-      fail-fast: false
-    steps:
-      - name: "Checkout Repository"
-        uses: actions/checkout@v2
-        with:
-          fetch-depth: 0
-
-      - name: "TEST-${{ matrix.test }}"
-        run: ./fedora-test-github.sh "TEST-${{ matrix.test }}" ${{ matrix.test }}
diff --git a/.github/workflows/fedora.yml b/.github/workflows/fedora.yml
new file mode 100644 (file)
index 0000000..17916b2
--- /dev/null
@@ -0,0 +1,54 @@
+## The test container is created with https://github.com/dracutdevs/fedora-container
+
+name: Fedora
+
+on:
+    pull_request:
+        branches: [ master ]
+
+jobs:
+    test:
+        runs-on: ubuntu-latest
+        timeout-minutes: 45
+        concurrency:
+            group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.fedora }}-${{ matrix.test }}
+            cancel-in-progress: true
+        strategy:
+            matrix:
+                fedora: [
+                        "32", "33", "34", "latest"
+                ]
+                test: [
+                        "01",
+                        "02",
+                        "03",
+                        "04",
+                        "10",
+                        "11",
+                        "12",
+                        "13",
+                        "14",
+                        "15",
+                        "17",
+                        "20",
+                        "21",
+                        "30",
+                        "31",
+                        "35",
+                        "36",
+                        "40",
+                        "41",
+                        "98",
+                ]
+            fail-fast: false
+        container:
+            image: quay.io/haraldh/dracut-fedora:${{ matrix.fedora }}
+            options: "-v /dev/kvm:/dev/kvm"
+        steps:
+            -   name: "Checkout Repository"
+                uses: actions/checkout@v2
+                with:
+                    fetch-depth: 0
+
+            -   name: "F${{ matrix.fedora }} TEST-${{ matrix.test }} ${{ github.head_ref }}"
+                run: ./fedora-test-github.sh "TEST-${{ matrix.test }}" ${{ matrix.test }}