Podman E2E with Podman installation #399
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Podman E2E with Podman installation | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '30 0 * * *' | |
jobs: | |
windows: | |
timeout-minutes: 120 | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
checks: write | |
env: | |
MAPT_VERSION: v0.6.8 | |
MAPT_IMAGE: quay.io/redhat-developer/mapt | |
strategy: | |
fail-fast: false | |
matrix: | |
windows-version: ['10','11'] | |
windows-featurepack: ['22h2-ent', '23h2-ent'] | |
exclude: | |
- windows-version: '10' | |
windows-featurepack: '23h2-ent' | |
- windows-version: '11' | |
windows-featurepack: '22h2-ent' | |
steps: | |
- name: Create instance | |
run: | | |
# Create instance | |
podman run -d --name windows-create --rm \ | |
-v ${PWD}:/workspace:z \ | |
-e ARM_TENANT_ID=${{ secrets.ARM_TENANT_ID }} \ | |
-e ARM_SUBSCRIPTION_ID=${{ secrets.ARM_SUBSCRIPTION_ID }} \ | |
-e ARM_CLIENT_ID=${{ secrets.ARM_CLIENT_ID }} \ | |
-e ARM_CLIENT_SECRET='${{ secrets.ARM_CLIENT_SECRET }}' \ | |
${{ env.MAPT_IMAGE }}:${{ env.MAPT_VERSION }} azure \ | |
windows create \ | |
--project-name 'windows-desktop' \ | |
--backed-url 'file:///workspace' \ | |
--conn-details-output '/workspace' \ | |
--windows-version '${{ matrix.windows-version }}' \ | |
--windows-featurepack '${{ matrix.windows-featurepack }}' \ | |
--vmsize 'Standard_D8s_v4' \ | |
--tags project=podman-desktop \ | |
--spot | |
# Check logs | |
podman logs -f windows-create | |
- name: Check instance system info | |
run: | | |
ssh -i id_rsa \ | |
-o StrictHostKeyChecking=no \ | |
-o UserKnownHostsFile=/dev/null \ | |
-o ServerAliveInterval=30 \ | |
-o ServerAliveCountMax=1200 \ | |
$(cat username)@$(cat host) "systeminfo" | |
- name: Emulate X session | |
run: | | |
# use fake rdp to emulate an active x session | |
podman run -d --name x-session \ | |
-e RDP_HOST=$(cat host) \ | |
-e RDP_USER=$(cat username) \ | |
-e RDP_PASSWORD=$(cat userpassword) \ | |
quay.io/rhqp/frdp:v0.0.1 | |
# Wait until the x session has been created | |
podman wait --condition running x-session | |
# Check logs for the x session | |
podman logs x-session | |
- name: Run podman desktop e2e | |
run: | | |
# Get latest built | |
tag=$(curl --silent https://api.github.com/repos/podman-desktop/podman-desktop/releases | jq -r 'map(select(.prerelease)) | first | .tag_name') | |
# Run e2e tests | |
podman run --rm -d --name pd-e2e-windows \ | |
-e TARGET_HOST=$(cat host) \ | |
-e TARGET_HOST_USERNAME=$(cat username) \ | |
-e TARGET_HOST_KEY_PATH=/data/id_rsa \ | |
-e TARGET_FOLDER=pd-e2e \ | |
-e TARGET_RESULTS=pd-e2e-results \ | |
-e OUTPUT_FOLDER=/data \ | |
-e DEBUG=true \ | |
-v $PWD:/data:z \ | |
quay.io/rhqp/podman-desktop-e2e:v1.1.0-windows-amd64 \ | |
pd-e2e/run.ps1 \ | |
-wslInstallFix 'false' \ | |
-targetFolder pd-e2e \ | |
-pdUrl "https://github.com/podman-desktop/podman-desktop/releases/download/${tag}/podman-desktop-${tag:1}.exe" \ | |
-junitResultsFilename podman-desktop-e2e-results-${tag}.xml \ | |
-resultsFolder pd-e2e-results | |
# Check logs | |
podman logs -f pd-e2e-windows | |
- name: Run podman functional e2e test | |
timeout-minutes: 60 | |
run: | | |
# Get latest built | |
tag=$(curl --silent https://api.github.com/repos/podman-desktop/podman-desktop/releases | jq -r 'map(select(.prerelease)) | first | .tag_name') | |
# Run e2e tests | |
podman run --rm -d --name podman-e2e \ | |
-e TARGET_HOST=$(cat host) \ | |
-e TARGET_HOST_USERNAME=$(cat username) \ | |
-e TARGET_HOST_KEY_PATH=/data/id_rsa \ | |
-e TARGET_FOLDER=podman-e2e \ | |
-e TARGET_RESULTS=podman-e2e-results-${tag}.xml \ | |
-e OUTPUT_FOLDER=/data \ | |
-e DEBUG=true \ | |
-v $PWD:/data:z \ | |
quay.io/rhqp/podman-backend-e2e:v4.7.1-windows-amd64 \ | |
podman-e2e/run.ps1 \ | |
-targetFolder podman-e2e \ | |
-podmanStart "true" \ | |
-junitResultsFilename podman-e2e-results-${tag}.xml | |
# Check logs | |
podman logs -f podman-e2e | |
- name: Destroy instance | |
if: always() | |
run: | | |
# Destroy instance | |
podman run -d --name windows-destroy --rm \ | |
-v ${PWD}:/workspace:z \ | |
-e ARM_TENANT_ID=${{ secrets.ARM_TENANT_ID }} \ | |
-e ARM_SUBSCRIPTION_ID=${{ secrets.ARM_SUBSCRIPTION_ID }} \ | |
-e ARM_CLIENT_ID=${{ secrets.ARM_CLIENT_ID }} \ | |
-e ARM_CLIENT_SECRET='${{ secrets.ARM_CLIENT_SECRET }}' \ | |
${{ env.MAPT_IMAGE }}:${{ env.MAPT_VERSION }} azure \ | |
windows destroy \ | |
--project-name 'windows-desktop' \ | |
--backed-url 'file:///workspace' | |
# Check logs | |
podman logs -f windows-destroy | |
- name: Publish Test Report | |
uses: mikepenz/action-junit-report@v5 | |
if: always() # always run even if the previous step fails | |
with: | |
fail_on_failure: true | |
include_passed: true | |
detailed_summary: true | |
require_tests: true | |
report_paths: '**/*results*.xml' | |
- name: Upload e2e test artifacts | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: E2E-results-windows-${{ matrix.windows-version }}${{ matrix.windows-featurepack }} | |
path: | | |
podman-e2e-results-*.xml | |
pd-e2e-results/* |