Improved Semaphore CI configuration#3210
Merged
Merged
Conversation
- Updated shebangs to `#!/usr/bin/env bash` and added `set -euo pipefail` for better error handling. - Improved emulator setup in `ci-setup-and-run-emulator.sh` by ensuring a fresh AVD state and configuring hardware parameters like RAM and GPU. - Optimized `ci-wait-for-emulator.sh` with more reliable boot completion checks and a retry loop for internet connectivity. - Added existence checks for directories and files in artifact and test result publishing scripts to prevent errors when files are missing. - Cleaned up redundant script headers and refactored argument handling in instrumentation test scripts.
…DNS property checks
…-wait-for-emulator.sh
…outing for flowcrypt.test domains
…t for flowcrypt.test tests
…st-network adb behavior
…chConfigurationFlowTest.kt
Alternative: docs: replace manual dnsmasq steps with ci-setup-DNS.sh usage
Collaborator
Author
|
@sosnovsky Please, review this one. |
sosnovsky
approved these changes
May 21, 2026
sosnovsky
left a comment
Collaborator
There was a problem hiding this comment.
quite big PR, but looks good 👍
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
close #3209
PR: Improve Semaphore CI Emulator/DNS Stability and Add Reproducible Test Docker Environment
Summary
This PR hardens Android CI test execution by stabilizing emulator networking/DNS setup, improving cache strategy, adding richer failure diagnostics, and introducing Dockerized test environment images/scripts for reproducibility.
What Changed
CI Pipeline (
.semaphore/semaphore.yml)script/ci-setup-DNS.sh.--no-daemon --build-cache.script/ci-after-fail-debug.sh.Emulator + Networking Scripts
script/ci-setup-DNS.sh:dnsmasq+ resolver.*.testand*.localhostto localhost.dig,ping).script/ci-wait-for-emulator.sh:adb roothandling with retries.127.0.0.1:443 -> :1212.script/create-avd.shscript/run-emulator.shDockerized Test Environment
docker/TestEnvironment/*:docker/HttpsTestWebServer/*:dnsmasq + nginxsetup for*.flowcrypt.test/*.localhostsupport.(just for local testing)Docs + Minor Updates
README.mdtest setup to usescript/ci-setup-DNS.sh.9.5.1ingradle/wrapper/gradle-wrapper.properties.FlowCrypt/build.gradle.kts.FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/gmailapi/passwordprotected/ComposeScreenPasswordProtectedDisallowedTermsReFetchConfigurationFlowTest.ktwith@Ignore("temporary disabled").Impact
Risks / Notes
/etc/resolv.confand rely ondnsmasq; environment assumptions must hold on CI agents.adb rootflow is stricter; failures should now fail fast with diagnostics.Tests (delete all except exactly one):
To be filled by reviewers
I have reviewed that this PR... (tick whichever items you personally focused on during this review):