feat(rockcraft-pack): support rockcraft test
Metadata
Current evaluation
Merged to integrate rockcraft test into the build workflow. The change handles implicit pack execution to avoid OCI Factory duplication. Approved by two reviewers, passed CI, and merged with 218 additions and 12 deletions.
Suggested action: —
No scores available.
Issue body
## Summary
This PR adds support for `rockcraft test` command as part of the build workflow, since `rockcraft test` implicitly runs `rockcraft pack` before calling spread.
This behaviour prevents us from adding `rockcraft test` as another job inside [OCI Factory Test-Rock workflow](https://github.com/canonical/oci-factory/blob/main/.github/workflows/Test-Rock.yaml), as those rely on a previously packed rock by the [Build workflow](https://github.com/canonical/oci-factory/blob/e6432dc8d5e591962de71a5184a86af11a154ea2/.github/workflows/Build-Rock.yaml#L130-L135), where this action is used.
Ideally, if `rockcraft test <rock-file>` (or similar) becomes a reality, this logic can be moved to OCI Factory Test-Rock workflow.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged to integrate rockcraft test into the build workflow. The change handles implicit pack execution to avoid OCI Factory duplication. Approved by two reviewers, passed CI, and merged with 218 additions and 12 deletions. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged. Adds rockcraft test support to the build workflow. Since the command implicitly runs rockcraft pack, it consolidates testing and packaging, enabling streamlined execution in the OCI Factory Test-Rock workflow. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #73 refactor: make rockcraft-pack follow new call conventions | craft-actions | merged | Merged after approvals and CI. Refactored rockcraft-pack to adopt new conventions: actions in dedicated directories, tests co-located, shared logic in common/. Updated 17 files. | |
| #57 feat(rockcraft): support --ignore=unmaintained | craft-actions | merged | Merged following approval from three reviewers and successful CI checks. Introduces the --ignore=unmaintained flag to rockcraft, resolving issue #52. The update modifies 9 files with 179 additions and 17 deletions. | |
| #42 feat(rockcraft-pack): implement pro field | craft-actions | merged | Merged implementation of the --pro flag for building pro rocks in rockcraft-pack. Requires rockcraft-channel specification as the flag is unavailable in stable. Approved by three reviewers with all CI checks passing. Title and description noted as outdated prior to merge. | |
| #174 tests: check before handling rockcraft instances | rockcraft | merged | Merged a fix wrapping rockcraft LXC instance cleanup in an if condition to prevent errors when spread tests do not create instances. Approved by two reviewers, passed CI, and modified one file. | |
| #262 feat(inspectors): add rockcraft inspector | fetch-service | merged | Merged the rockcraft inspector feature, resolving issue #260 and CRAFT-3561. Approved by three reviewers, the change modifies 12 files with 666 additions and 29 deletions. An OSV scanner dependency was noted but did not block the merge. | |
| #869 feat: add 'test' command | rockcraft | merged | Merged. Added the 'test' CLI command and spread tests for rockcraft. Approved by two reviewers, passed CI checks, and introduced 276 lines across seven files to validate the command using hardcoded fixtures. | |
| #951 feat: implement Jlink plugin | craft-parts | merged | Merged after implementing the Jlink plugin with unit and integration tests, documentation, and resolving issue #891. Approved by three reviewers with passing CI. A follow-up PR was created for rockcraft integration. | |
| #173 tests: check before handling rockcraft instances | rockcraft | closed | Merged after two approvals and passing CI. Updates spread test cleanup to conditionally stop and delete rockcraft lxc instances, preventing errors when tests do not create them. (+5/-2 lines) | |
| #8 project: add rockcraft.yaml load function (CRAFT-586) | rockcraft | merged | Merged after approval and passing CI checks. Extracts project file loading into a dedicated function with tests, modifying four files with 89 additions and 19 deletions. | |
| #39 feat(rockcraft-pack): accept env-file input | craft-actions | open | Adds an optional env-file input to the rockcraft-pack action to source an execution environment before running Rockcraft. In Draft; author moved it to Draft after internal discussion and asked a reviewer to close it if the feature is deemed unnecessary. 5 unresolved review comments; test-action-code CI failing. |