Repository navigation
ci: add a GitLab CI for the offline checks and the Android testers - #37
Merged
pierridotite merged 4 commits intoNov 28, 2026
Conversation
GitHub Actions is the only CI the project ships, so a GitLab user cannot run the suite or the testers without rewriting the workflow. The build scripts, the persona tools and the encryption are already portable, so this adds the GitLab side that reuses them. - test: the same offline checks as .github/workflows/tests.yml (unit tests, compileall, shellcheck) on the two Python versions CI uses, with no phone and no secret, so any runner can run them. - testers: the Android testers, manual, on a runner tagged `kvm` that provides a booted emulator (scripts/android/run_agent.sh assumes one is up, exactly as it does under the GitHub action). It reuses scripts/build/android.sh and scripts/android/run_agent.sh unchanged and encrypts the results first. iOS still needs a macOS runner, which gitlab.com's shared runners are not, so it is left to a self-hosted macOS runner. Refs pierridotite#17
The GitLab file points at the repository's own scripts, so a moved or renamed script would break it silently. tests/test_matrix.py already reads the GitHub workflow and test_i18n_links.py checks that referenced paths exist; this follows the same idea for .gitlab-ci.yml: every referenced path exists, the offline checks match tests.yml, and the Android job reuses the repository scripts.
Issue pierridotite#17 sends readers of the "Other CI" section to this file; name it there so a contributor adding Bitrise or Codemagic sees what the GitLab port covers and what is still open.
Owner
|
Thanks, the offline part is good and the test is a nice guard. Three things before I merge:
If the Android job can't be tried on a KVM runner, I'm also fine with a PR that only has the offline checks, and the Android job in a second one. Generated by Claude Code |
Three fixes from review: - shell-scripts ran on debian:stable-slim, which has no git, so `git ls-files` failed; install git with shellcheck. - run_agent.sh runs under set -u and reads LOCALE, DEVICE and GEO, which the job never set; read them from personas.json for $PERSONA via scripts/matrix.py, the same way the GitHub plan job does. - keep the template-key fail-closed check from the GitHub "Check setup" step instead of only test -s, so a fork that did not run ./setup.sh cannot encrypt its results to a key it does not hold the private half of.
Owner
|
Thanks, all three are fixed. Merged. I added a small follow-up (76c6283) so the job also passes the persona's font scale, theme, contrast, color filter and network, like the GitHub matrix does. Generated by Claude Code |
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.
Overview
This adds a GitLab CI (
.gitlab-ci.yml) so the project can run on GitLab as well as GitHub Actions, reusing the scripts that already exist instead of rewriting the workflow.It ports the half that is portable without a phone or a macOS runner:
.github/workflows/tests.yml(unit tests,compileall,shellcheck) on both Python versions CI uses — no phone, no model, no secret, so any runner runs them;.github/workflows/agent-testers.ymlas a manual job on a runner taggedkvm, reusingscripts/build/android.shandscripts/android/run_agent.shunchanged.Closes #17 (partially — see "What is not covered").
Motivation
The project ships only GitHub Actions. Its build scripts, persona tools and encryption are explicitly portable (
CONTRIBUTING.md→ "Other CI"), and issue #17 asks for a GitLab CI "that reuses them (Android first, on Linux runners with KVM)". This delivers that without touching any existing script or workflow.Changes, commit by commit
a40cd9dci: add a GitLab CI for the offline checks and the Android testers.gitlab-ci.ymlstages: [test, testers].unit-tests-3.9/unit-tests-3.13extend a.unit-teststemplate that runspython3 -m unittest discover -s tests -qandpython3 -m compileall -q scripts tests— the exact commands oftests.yml.shell-scriptsmirrors thebash -n+shellcheck -S warningpass.android-testersiswhen: manual,tags: [kvm], builds withscripts/build/android.sh, runsscripts/android/run_agent.sh, thengit checkout -- scripts results_public.pemandscripts/encrypt_results.shbefore the encryptedresults.enc/artifact.00fca5dtest: keep the GitLab CI in step with the GitHub workflowtests/test_gitlab_ci.pytest_matrix.py(reads the workflow) andtest_i18n_links.py(checks referenced paths): every path the file names exists, the offline checks matchtests.yml, and the Android job still reuses the repository scripts.56d65e0docs: point the Other CI section at the GitLab CICONTRIBUTING.mdTechnical implementation
scripts/android/run_agent.sh's own header says it "runs inside android-emulator-runner once the emulator is up". On GitLab that "once the emulator is up" is thekvm-tagged runner's job, exactly as it is the GitHub action's job on GitHub. So no emulator-bootstrap code is added that could rot; the script's existing contract is respected.LLM_API_KEY/CLAUDE_CODE_OAUTH_TOKEN,ARTIFACT_PASSPHRASE) and a committedresults_public.pem; it fails closed when that key is missing, and encrypts before the artifact, because the logs of a public repo are public.after_scriptrestoresscripts/and the public key before runningencrypt_results.sh, the same ordering the GitHub job uses withgit checkout -- scripts results_public.pem.unittest, and nothing in the existing workflow, scripts or tests changes.Testing
Run offline, no phone and no model:
The
testjobs are verified locally with the same commands they run. Theandroid-testersjob needs a GitLab runner with KVM and a booted emulator, which this environment does not have, so it is provided as a faithful port of the GitHub job and not executed here — call that out in review if you want the emulator bootstrap in the file instead of on the runner.Compatibility
.github/workflows/tests.ymluses.tests/test_gitlab_ci.pyruns anywhere the rest of the suite does.What is not covered
scripts/build/ios.shandscripts/ios/run_agent.shwould port them the same way (noted in the file header).PERSONAvariable, set when you run the pipeline.References
CONTRIBUTING.md→ "Other CI".github/workflows/tests.yml,.github/workflows/agent-testers.ymltests/test_matrix.py.