Run macOS connect smoke on self-hosted runner#8899
Conversation
…hosted # Conflicts: # .github/scripts/macos_smoke_suite.sh
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR splits the macOS connect/disconnect smoke test out of the standard hosted macOS build workflow into a dedicated reusable workflow that runs on a persistent self-hosted macOS ARM64 runner, while the hosted build job produces and uploads a signed app artifact for the smoke job to consume.
Changes:
- Added a new reusable workflow (
macos-connect-smoke.yml) that downloads build artifacts and runs the connect smoke suite on a self-hosted runner. - Updated the macOS build workflow to package and upload
Lantern.app.zipas an artifact (and removed the inline connect smoke execution). - Updated the app smoke test orchestrator to invoke the new macOS connect smoke workflow after the macOS build completes.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
.github/workflows/macos-connect-smoke.yml |
New reusable workflow to run macOS connect smoke on a self-hosted runner using downloaded artifacts. |
.github/workflows/build-macos.yml |
Removes in-build connect smoke; packages and uploads the macOS app as a zipped artifact for downstream smoke testing. |
.github/workflows/app-smoke-tests.yml |
Adds a dedicated macos-connect-smoke job that depends on the macOS build and calls the new workflow. |
.github/scripts/macos_smoke_suite.sh |
Enhances app path resolution to support downloaded artifacts (zip/DMG) and improves cleanup behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - name: Decode APP_ENV | ||
| uses: timheuer/base64-to-file@v1.2 | ||
| with: | ||
| fileName: "app.env" | ||
| fileDir: ${{ github.workspace }} | ||
| encodedString: ${{ secrets.APP_ENV }} | ||
|
|
||
| - name: Prepare macOS test project | ||
| shell: bash | ||
| run: | | ||
| set -euo pipefail | ||
| echo "GOMOBILECACHE=$HOME/.cache/gomobile" >> "$GITHUB_ENV" | ||
| mkdir -p "$HOME/.cache/gomobile" | ||
| flutter --version | ||
| flutter config --enable-macos-desktop | ||
| make install-gomobile | ||
| make macos pubget gen | ||
|
|
| - name: macOS connect smoke suite | ||
| shell: bash | ||
| run: ./.github/scripts/macos_smoke_suite.sh |
| extract_app_zip() { | ||
| local zip_path="$1" | ||
| local tmp_dir | ||
| tmp_dir="$(mktemp -d)" | ||
|
|
||
| log_step "Extracting Lantern app from $zip_path" | ||
| ditto -x -k "$zip_path" "$tmp_dir" | ||
|
|
||
| local app_path | ||
| app_path="$(find_first_name "$tmp_dir" "Lantern.app" || true)" | ||
| if [[ -z "$app_path" ]]; then | ||
| printf 'Lantern.app not found inside %s\n' "$zip_path" >&2 | ||
| rm -rf "$tmp_dir" | ||
| return 1 | ||
| fi | ||
|
|
||
| copy_app_bundle "$app_path" "$APP_INSTALL_DIR" | ||
| rm -rf "$tmp_dir" | ||
| } |
Splits the macOS connect smoke into a dedicated self-hosted CI job. The macOS build still runs on the normal hosted workflow, then the signed app artifact is downloaded and tested on the persistent lantern-macos-smoke runner