From 0cc91fe5c9952e014cac86b6768e4e63e4523126 Mon Sep 17 00:00:00 2001 From: Kentaro Hayashi Date: Mon, 29 Sep 2025 11:28:36 +0900 Subject: [PATCH 1/3] Add test workflows Signed-off-by: Kentaro Hayashi --- .github/workflows/test.matrix.json | 44 +++++++++++++ .github/workflows/test.yml | 102 +++++++++++++++++++++++++++++ 2 files changed, 146 insertions(+) create mode 100644 .github/workflows/test.matrix.json create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.matrix.json b/.github/workflows/test.matrix.json new file mode 100644 index 0000000..f93c316 --- /dev/null +++ b/.github/workflows/test.matrix.json @@ -0,0 +1,44 @@ +{ + "include": [ + { + "label": "Bookworm", + "deb": "debian:bookworm", + "rpm": "dummy" + }, + { + "label": "Trixie", + "deb": "debian:trixie", + "rpm": "dummy" + }, + { + "label": "Jammy", + "deb": "ubuntu:jammy", + "rpm": "dummy" + }, + { + "label": "Noble", + "deb": "ubuntu:noble", + "rpm": "dummy" + }, + { + "label": "AlmaLinux8", + "deb": "dummy", + "rpm": "almalinux:8" + }, + { + "label": "AlmaLinux9", + "deb": "dummy", + "rpm": "almalinux:9" + }, + { + "label": "AlmaLinux10", + "deb": "dummy", + "rpm": "almalinux:10" + }, + { + "label": "AmazonLinux", + "deb": "dummy", + "rpm": "amazonlinux:2023" + } + ] +} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..0f952df --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,102 @@ +name: Installation Test Suite +on: + push: + branches: + - r2 + pull_request: + workflow_dispatch: +concurrency: + group: ${{ github.head_ref || github.sha }}-${{ github.workflow }} + cancel-in-progress: true +jobs: + define-matrix: + runs-on: ubuntu-latest + outputs: + matrix: ${{ steps.set-matrix.outputs.matrix }} + label: ${{ steps.set-matrix.outputs.label }} + v6: ${{ steps.set-matrix.outputs.v6 }} + v6lts: ${{ steps.set-matrix.outputs.v6lts }} + steps: + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.4' + - id: set-matrix + # See https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/evaluate-expressions-in-workflows-and-actions#example-returning-a-json-object + run: | + echo "matrix=$(cat test.matrix.json | jq --compact-output)" >> $GITHUB_OUTPUT + echo "label=$(cat test.matrix.json | jq '[.include[].label]' --compact-output)" >> $GITHUB_OUTPUT + git clone https://github.com/fluent/fluent-package-builder.git + pushd fluent-package-builder + echo "v6lts=[\"$(git tag | grep v6.0 | tail -n 1 | sed -e 's/v//')\"]" >> $GITHUB_OUTPUT + echo "v6=[\"$(git tag | grep v6 | tail -n 1 | sed -e 's/v//')\"]" >> $GITHUB_OUTPUT + popd + working-directory: .github/workflows/ + + v6_install_test: + name: Test ${{ matrix.label }} v6 + needs: [define-matrix] + runs-on: ubuntu-latest + timeout-minutes: 15 + strategy: + fail-fast: false + matrix: + label: ${{ fromJSON(needs.define-matrix.outputs.label) }} + include: ${{ fromJSON(needs.define-matrix.outputs.matrix).include }} + tag: ${{ fromJSON(needs.define-matrix.outputs.v6) }} + steps: + - uses: actions/checkout@v4 + - name: Run Test ${{ matrix.label }} ${{ matrix.tag }} for v6 + run: | + REPO_TARGETS=6 DEB_TARGETS=${{ matrix.deb }} RPM_TARGETS=${{ matrix.rpm }} ./test-verify-repo.sh ${{ matrix.tag }} + + v6_lts_install_test: + name: Test ${{ matrix.label }} v6/lts + needs: [define-matrix] + runs-on: ubuntu-latest + timeout-minutes: 15 + strategy: + fail-fast: false + matrix: + label: ${{ fromJSON(needs.define-matrix.outputs.label) }} + include: ${{ fromJSON(needs.define-matrix.outputs.matrix).include }} + tag: ${{ fromJSON(needs.define-matrix.outputs.v6lts) }} + steps: + - uses: actions/checkout@v4 + - name: Run Test ${{ matrix.label }} ${{ matrix.tag }} for v6/lts + run: | + REPO_TARGETS=lts/6 DEB_TARGETS=${{ matrix.deb }} RPM_TARGETS=${{ matrix.rpm }} ./test-verify-repo.sh ${{ matrix.tag }} + + v6_exp_install_test: + name: Test ${{ matrix.label }} v6/exp + needs: [define-matrix] + runs-on: ubuntu-latest + timeout-minutes: 15 + strategy: + fail-fast: false + matrix: + label: ${{ fromJSON(needs.define-matrix.outputs.label) }} + include: ${{ fromJSON(needs.define-matrix.outputs.matrix).include }} + tag: ${{ fromJSON(needs.define-matrix.outputs.v6lts) }} + steps: + - uses: actions/checkout@v4 + - name: Run Test ${{ matrix.label }} for v6/exp + run: | + REPO_TARGETS=6/exp DEB_TARGETS=${{ matrix.deb }} RPM_TARGETS=${{ matrix.rpm }} ./test-verify-repo.sh ${{ matrix.tag }} + + v6_exp_lts_install_test: + name: Test ${{ matrix.label }} v6/exp/lts + needs: [define-matrix] + runs-on: ubuntu-latest + timeout-minutes: 15 + strategy: + fail-fast: false + matrix: + label: ${{ fromJSON(needs.define-matrix.outputs.label) }} + include: ${{ fromJSON(needs.define-matrix.outputs.matrix).include }} + tag: ${{ fromJSON(needs.define-matrix.outputs.v6lts) }} + steps: + - uses: actions/checkout@v4 + - name: Run Test ${{ matrix.label }} for v6/exp/lts + run: | + REPO_TARGETS=6/exp DEB_TARGETS=${{ matrix.deb }} RPM_TARGETS=${{ matrix.rpm }} ./test-verify-repo.sh ${{ matrix.tag }} From 761e382ce484fd4fcee4d6c26fd384203a60c073 Mon Sep 17 00:00:00 2001 From: Kentaro Hayashi Date: Mon, 29 Sep 2025 12:05:26 +0900 Subject: [PATCH 2/3] Update .github/workflows/test.yml Co-authored-by: Shizuo Fujita Signed-off-by: Kentaro Hayashi --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0f952df..575e158 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -99,4 +99,4 @@ jobs: - uses: actions/checkout@v4 - name: Run Test ${{ matrix.label }} for v6/exp/lts run: | - REPO_TARGETS=6/exp DEB_TARGETS=${{ matrix.deb }} RPM_TARGETS=${{ matrix.rpm }} ./test-verify-repo.sh ${{ matrix.tag }} + REPO_TARGETS=exp/lts/6 DEB_TARGETS=${{ matrix.deb }} RPM_TARGETS=${{ matrix.rpm }} ./test-verify-repo.sh ${{ matrix.tag }} From ee41805b528542e9558978f901f94cfe0aa2e6ce Mon Sep 17 00:00:00 2001 From: Kentaro Hayashi Date: Mon, 29 Sep 2025 12:05:44 +0900 Subject: [PATCH 3/3] Update .github/workflows/test.yml Co-authored-by: Shizuo Fujita Signed-off-by: Kentaro Hayashi --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 575e158..7d83f65 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -82,7 +82,7 @@ jobs: - uses: actions/checkout@v4 - name: Run Test ${{ matrix.label }} for v6/exp run: | - REPO_TARGETS=6/exp DEB_TARGETS=${{ matrix.deb }} RPM_TARGETS=${{ matrix.rpm }} ./test-verify-repo.sh ${{ matrix.tag }} + REPO_TARGETS=exp/6 DEB_TARGETS=${{ matrix.deb }} RPM_TARGETS=${{ matrix.rpm }} ./test-verify-repo.sh ${{ matrix.tag }} v6_exp_lts_install_test: name: Test ${{ matrix.label }} v6/exp/lts