Skip to content

Commit

Permalink
chore(ci): add Mac Update E2E job into PR check and e2e-main workflow…
Browse files Browse the repository at this point in the history
…s (#10384)

Signed-off-by: Ondrej Dockal <[email protected]>
  • Loading branch information
odockal authored Dec 17, 2024
1 parent e026f49 commit d0d3cbc
Showing 1 changed file with 87 additions and 7 deletions.
94 changes: 87 additions & 7 deletions .github/workflows/pr-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ jobs:
echo "PNPM_LOCK_CHANGED=false" >> $GITHUB_OUTPUT
fi
run-update-e2e-test:
win-update-e2e-test:
name: win update e2e tests
needs: detect_pnpm_changes
if: contains(github.event.pull_request.labels.*.name, 'area/update') || needs.detect_pnpm_changes.outputs.pnpm_lock_changed == 'true'
Expand Down Expand Up @@ -467,19 +467,99 @@ jobs:
./tests/**/output/
!./tests/**/traces/raw
mac-update-e2e-test:
name: mac update e2e tests
needs: detect_pnpm_changes
if: contains(github.event.pull_request.labels.*.name, 'area/update') || needs.detect_pnpm_changes.outputs.pnpm_lock_changed == 'true'
runs-on: macos-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
timeout-minutes: 60
steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false

- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'

- name: Execute pnpm
run: pnpm install

- name: Execute PNPM
run: pnpm install --frozen-lockfile

- name: Adjust/Downgrade local podman desktop version
run: |
version="1.13.0"
jq --arg version "$version" '.version = $version' package.json > package.json_tmp
mv package.json_tmp package.json
- name: Build Podman Desktop locally with electron updater included
env:
ELECTRON_ENABLE_INSPECT: true
run: |
pnpm compile:current --mac dmg
dmgPath=$(realpath $(find ./dist -name "*.dmg"))
echo "DMG Path: $dmgPath"
# extract the dmg
hdiutil attach $dmgPath
pdVolumePath=$(find /Volumes -name *1.13.0*)
echo "PD Volume path: $pdVolumePath"
sudo cp -R "$pdVolumePath/Podman Desktop.app" /Applications
# codesign the extracted app
appPath="/Applications/Podman Desktop.app"
sudo codesign --force --deep --sign - "$appPath"
codesign --verify --deep --verbose=2 "$appPath"
binaryPath="$appPath/Contents/MacOS/Podman Desktop"
echo "PODMAN_DESKTOP_BINARY=$binaryPath" >> $GITHUB_ENV
- name: Run E2E Update test
env:
UPDATE_PODMAN_DESKTOP: true
run: |
echo "${{ env.PODMAN_DESKTOP_BINARY }}"
pnpm test:e2e:update:run
- 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
annotate_only: true
require_tests: true
report_paths: '**/*results.xml'

- uses: actions/upload-artifact@v4
if: always()
with:
name: mac-update-e2e-test
path: |
./tests/**/output/
!./tests/**/traces/raw
update-e2e-test:
name: update E2E test
runs-on: ubuntu-24.04
needs: run-update-e2e-test
needs: [win-update-e2e-test, mac-update-e2e-test]
if: |
always()
steps:
- name: Evaluate the Windows Update test results
- name: Evaluate the Windows and Mac E2E Update test results
run: |
echo "Windows updater result: ${{ needs.run-update-e2e-test.result }}"
if [ "${{ needs.run-update-e2e-test.result }}" = "failure" ]; then
echo "Windows udpater test failed..."
echo "Windows updater result: ${{ needs.win-update-e2e-test.result }}"
echo "Mac updater result: ${{ needs.mac-update-e2e-test.result }}"
if [[ "${{ needs.win-update-e2e-test.result }}" = "failure" || "${{ needs.mac-update-e2e-test.result }}" = "failure" ]]; then
echo "Windows or Mac udpater test failed..."
exit 1
else
echo "Windows updater test succeeded or was skipped..."
echo "Windows and Mac updater test succeeded or was skipped..."
fi

0 comments on commit d0d3cbc

Please sign in to comment.