ci: harden integration test script and improve logcat handling
This PR improves the stability, safety, and reliability of the integration test Bash script used in the Android CI pipeline.
✔ Summary of Improvements
The update focuses on modernizing the script, preventing silent failures, and ensuring logcat output is reliably collected and uploaded when tests fail.
🔧 Key Changes
- Enabled strict Bash mode (
set -euo pipefail) for safer execution - Quoted all variable expansions to avoid word-splitting and globbing issues
- Replaced hardcoded Codecov token with secure environment variable usage
- Ensured clean termination of background logcat using:
-
wait "$LOGCAT_PID"to flush output -
kill "$LOGCAT_PID" 2>/dev/null || trueto avoid CI crashes
-
- Improved logcat upload logic and error handling
- Ensured correct exit code propagation to Drone CI
- General cleanup to follow Bash best practices
💡 Why This Matters
The previous script:
- could hide failed commands,
- could produce truncated or inconsistent logs,
- leaked a sensitive token,
- and could fail unpredictably in CI.
This update makes integration tests more secure, deterministic, and easier to debug—benefiting both maintainers and contributors.
🧪 Testing Notes
Only CI-related behavior was modified.
No application logic is affected.
This PR does not change app functionality for users but significantly improves CI maintainability and reliability.
merge it
Hello there, Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.
We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.
Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6
Thank you for contributing to Nextcloud and we hope to hear from you soon!
(If you believe you should not receive this message, you can add yourself to the blocklist.)