summaryrefslogtreecommitdiffstats
path: root/.github/workflows/manualtest.yml
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-03 14:01:35 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-03 14:01:35 +0000
commite6f2eaf47a177a8eca054d1d70a1b6287e8c3521 (patch)
treec5719e819a9e37df4b54affd61438f382ec38a8f /.github/workflows/manualtest.yml
parentAdding upstream version 060+5. (diff)
downloaddracut-e6f2eaf47a177a8eca054d1d70a1b6287e8c3521.tar.xz
dracut-e6f2eaf47a177a8eca054d1d70a1b6287e8c3521.zip
Adding upstream version 102.upstream/102
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '.github/workflows/manualtest.yml')
-rw-r--r--.github/workflows/manualtest.yml50
1 files changed, 43 insertions, 7 deletions
diff --git a/.github/workflows/manualtest.yml b/.github/workflows/manualtest.yml
index b790dcf..74e5647 100644
--- a/.github/workflows/manualtest.yml
+++ b/.github/workflows/manualtest.yml
@@ -5,34 +5,70 @@ on:
inputs:
test:
description: "Array of tests to run, such as [11,12]"
- default: "['04']"
- required: true
+ default: "[]"
container:
type: choice
description: 'distro'
- default: 'fedora'
+ default: 'all'
options:
+ - "all"
+ - "alpine"
- "fedora"
- "arch"
- "debian"
- "ubuntu"
- "opensuse"
- "gentoo"
+ - "void"
+ env:
+ description: 'Environment (optional)'
+ default: '{"DEBUGFAIL": "rd.debug"}'
+ registry:
+ description: 'Registry for containers, such as ghcr.io/dracut-ng'
+
+env:
+ ${{ fromJSON(inputs.env) }}
jobs:
+ matrix:
+ runs-on: ubuntu-latest
+ outputs:
+ registry: ${{ steps.set-matrix.outputs.registry }}
+ container: ${{ steps.set-matrix.outputs.container }}
+ tests: ${{ steps.set-matrix.outputs.tests }}
+ steps:
+ - name: "Checkout Repository"
+ uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+ - id: set-matrix
+ name: "Set Matrix"
+ run: |
+ [[ "${{ inputs.registry }}" != '' ]] && echo "registry=\"${{ inputs.registry }}\"" >> $GITHUB_OUTPUT \
+ || ( echo "registry=\"ghcr.io/${{ github.repository_owner }}\"" >> $GITHUB_OUTPUT )
+ [[ "${{ inputs.container }}" != 'all' ]] && echo "container=[\"${{ inputs.container }}\"]" >> $GITHUB_OUTPUT \
+ || ( containers=$(find test/container -name "Dockerfile-*" | cut -d\- -f2 | tr '[:upper:]' '[:lower:]' | sed -z 's/\n/","/g'); echo "container=[\"${containers%??}]" >> $GITHUB_OUTPUT )
+ [[ "${{ toJson(fromJson(inputs.test)) }}" != '[]' ]] && echo "tests=${{ inputs.test }}" >> $GITHUB_OUTPUT \
+ || ( tests=$(find test -type d -a -name "TEST-*" | cut -d\- -f2 | sed -z 's/\n/","/g' ); echo "tests=[\"${tests%??}]" >> $GITHUB_OUTPUT )
test:
+ needs: matrix
runs-on: ubuntu-latest
timeout-minutes: 45
+ concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.container }}-${{ matrix.test }}
+ cancel-in-progress: true
strategy:
matrix:
- test: ${{ fromJSON(inputs.test) }}
+ container: ${{ fromJSON(needs.matrix.outputs.container) }}
+ test: ${{ fromJSON(needs.matrix.outputs.tests) }}
+ fail-fast: false
container:
- image: ghcr.io/dracutdevs/${{ inputs.container }}
+ image: ${{ fromJSON(needs.matrix.outputs.registry) }}/${{ matrix.container }}
options: "--privileged -v /dev:/dev"
steps:
- name: "Checkout Repository"
- uses: actions/checkout@v1
+ uses: actions/checkout@v4
with:
fetch-depth: 0
- - name: "${{ inputs.container }} ${{ matrix.test }}"
+ - name: "${{ matrix.container }} ${{ matrix.test }}"
run: ./tools/test-github.sh "TEST-${{ matrix.test }}" ${{ matrix.test }}