ci: refactor test setup#8
Merged
Merged
Conversation
Replace the pull_request_target + manual GitHub Environment approval flow with a build -> test (matrix) -> tests-pass structure: - In-repo (maintainer) PRs run automatically on pull_request. - Fork PRs lack secret access and are triggered by a maintainer commenting /test, dispatched via peter-evans/slash-command-dispatch (test-slash-command.yaml -> repository_dispatch). - Split build (package once, upload dist artifact) from a matrix test job so multiple base images can be tested; results are posted back to the PR. - Add a stable "Tests Pass" gate job for branch protection. - Move .python-version into tests/ and pin actions to current majors. Requires a repo-scoped PAT stored as the COMMUNITY_ACTIONS_PAT secret. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Replace the single suite-level device with a fresh device created and destroyed per test: - Setup Device / Teardown Device create the container via docker-compose, register it through the Cumulocity CA, and clean up the managed object and device user afterwards (no more manual cleanup). - Parametrize images/Dockerfile with ARG TEST_IMAGE so the matrix can target different base images; build it via docker-compose (replaces the per-image test-images/<IMAGE>/Dockerfile and the just build-test target). - Bump robotframework-c8y and robotframework-devicelibrary to versions that support Cumulocity CA registration and per-test Setup. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Robot Results
|
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.
Refactor the CI and system tests to the modern thin-edge.io community pattern (mirrors thin-edge/tedge-apk-plugin#5).
What changed
DeviceLibrary.Setup(Test Setup/Test Teardown). The device is registered through the Cumulocity CA (Bulk Register Device With Cumulocity CA+tedge cert download c8y) and cleaned up afterwards withDelete Managed Object And Device User— no more manual cleanup of devices/certs/users./test— the legacypull_request_target+ manual GitHub Environment approval is gone. In-repo (maintainer) PRs run automatically onpull_request; fork PRs (no secret access) run only when a maintainer comments/test, dispatched viapeter-evans/slash-command-dispatch(test-slash-command.yaml→repository_dispatch).testjob split intobuild→test(matrix) →tests-pass. The package is built once and uploaded as thedist-packagesartifact; the test job downloads it and runs the matrix. Results are posted back to the PR.test-images/<IMAGE>/Dockerfileis replaced by a single parametrizedimages/Dockerfile(ARG TEST_IMAGE), built via a minimaldocker-compose.yaml. The matrix currently runs the systemd demo image (debian-12); add more entries to cover more images..python-versionmoved totests/.python-version; obsoleteIMAGE/build-testjusttargets removed; action versions pinned to current majors;robotframework-c8y→0.51.1androbotframework-devicelibrary→1.26.1(needed for the CA flow and per-testSetup).COMMUNITY_ACTIONS_PATsecret — a repo-scoped PAT must be stored as theCOMMUNITY_ACTIONS_PATsecret. The defaultGITHUB_TOKENcannot createrepository_dispatchevents, so the/testslash command will not work without it.Tests Pass(the matrix job names change, but this gate job name is stable).Notes
journalctl), matching the demo image's init system.actionlintis clean (the pre-existingrelease.yamlshellcheck note is unrelated). Robot--dryrunpasses, confirming all keywords resolve against the bumped libraries.🤖 Generated with Claude Code