feat(ci): add E2E workflow for testing flatpak bundles (#16838)

* feat(ci): add E2E workflow for testing flatpak bundles
* feat(ci): integrate flatpak E2E tests into e2e-main workflow via matrix strategy

Signed-off-by: Tibor Dancs (work-laptop) <tdancs@redhat.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
ScrewTSW 2026-04-20 16:46:41 +02:00 committed by GitHub
parent 691ae51e5d
commit 0974507339
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -81,12 +81,16 @@ permissions:
jobs: jobs:
e2e-tests: e2e-tests:
name: Run All E2E tests name: Run E2E tests - ${{ matrix.installation }}
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04
# disable on forks as secrets are not available # disable on forks as secrets are not available
if: github.event.repository.fork == false if: github.event.repository.fork == false
permissions: permissions:
checks: write # required for mikepenz/action-junit-report checks: write # required for mikepenz/action-junit-report
strategy:
fail-fast: false
matrix:
installation: [source-build, flatpak-build]
steps: steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with: with:
@ -127,7 +131,16 @@ jobs:
- name: Execute pnpm - name: Execute pnpm
run: pnpm install run: pnpm install
- name: Install flatpak build dependencies
if: matrix.installation == 'flatpak-build'
run: |
sudo apt-get update
sudo apt-get install -y flatpak flatpak-builder elfutils
flatpak remote-add --if-not-exists flathub --user https://flathub.org/repo/flathub.flatpakrepo
flatpak install --user -y flathub org.flatpak.Builder org.freedesktop.Platform//25.08 org.freedesktop.Sdk//25.08
- name: Run E2E tests in Production Mode - name: Run E2E tests in Production Mode
if: matrix.installation == 'source-build'
env: env:
PODMANDESKTOP_CI_BOT_TOKEN: ${{ secrets.PODMANDESKTOP_CI_BOT_TOKEN }} PODMANDESKTOP_CI_BOT_TOKEN: ${{ secrets.PODMANDESKTOP_CI_BOT_TOKEN }}
TEST_PODMAN_MACHINE: 'true' TEST_PODMAN_MACHINE: 'true'
@ -142,6 +155,25 @@ jobs:
export PODMAN_DESKTOP_BINARY=$path export PODMAN_DESKTOP_BINARY=$path
pnpm ${{ env.NPM_TARGET }} pnpm ${{ env.NPM_TARGET }}
- name: Run E2E tests on Flatpak bundle
if: matrix.installation == 'flatpak-build'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PODMANDESKTOP_CI_BOT_TOKEN: ${{ secrets.PODMANDESKTOP_CI_BOT_TOKEN }}
TEST_PODMAN_MACHINE: 'true'
SKIP_KIND_INSTALL: 'true'
KIND_PROVIDER_GHA: ${{ env.KIND_PROVIDER }}
ELECTRON_ENABLE_INSPECT: true
run: |
echo "Building Podman Desktop flatpak bundle"
pnpm compile:current --linux flatpak
echo "Installing built flatpak bundle"
flatpak install --bundle --user -y dist/*.flatpak
path=$(realpath $(flatpak info --show-location io.podman_desktop.PodmanDesktop)/files/lib/io.podman_desktop.PodmanDesktop/podman-desktop)
echo "Podman Desktop flatpak binary: $path"
export PODMAN_DESKTOP_BINARY=$path
pnpm ${{ env.NPM_TARGET }}
- name: Publish Test Report - name: Publish Test Report
uses: mikepenz/action-junit-report@bccf2e31636835cf0874589931c4116687171386 # v6.4.0 uses: mikepenz/action-junit-report@bccf2e31636835cf0874589931c4116687171386 # v6.4.0
if: always() # always run even if the previous step fails if: always() # always run even if the previous step fails
@ -156,7 +188,7 @@ jobs:
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: always() if: always()
with: with:
name: e2e-tests name: e2e-tests-${{ matrix.installation }}
path: | path: |
./tests/**/output/ ./tests/**/output/
!./tests/**/traces/raw !./tests/**/traces/raw
@ -250,7 +282,7 @@ jobs:
Set-Content -ErrorAction Stop $updateFile Set-Content -ErrorAction Stop $updateFile
echo "Show app-update.yml after replace..." echo "Show app-update.yml after replace..."
cat "$env:PD_DIST_PATH/resources/app-update.yml" cat "$env:PD_DIST_PATH/resources/app-update.yml"
- name: Run E2E Update test - name: Run E2E Update test
env: env:
INSTALLATION_TYPE: ${{ matrix.installation }} INSTALLATION_TYPE: ${{ matrix.installation }}
@ -282,7 +314,7 @@ jobs:
name: ${{ matrix.os }} update e2e tests name: ${{ matrix.os }} update e2e tests
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
os: [macos-26, macos-15-intel] os: [macos-26, macos-15-intel]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
# disable on forks as secrets are not available # disable on forks as secrets are not available