feat(rockcraft-pack): support rockcraft test - #40
Conversation
cjdcordeiro
left a comment
There was a problem hiding this comment.
Pls re-request review when tests are passing
| let rockcraft = 'rockcraft pack' | ||
| let rockcraftPackArgs = '' | ||
|
|
||
| if (tools.fileExists(`${this.projectRoot}/spread.yaml`)) { |
There was a problem hiding this comment.
I don't think this heuristic is enough. There are repositories that have a spread.yaml and use this action, but those spread tests are not meant for rockcraft test (they are regular spread tests that use gce).
Both this and checking whether "rockcraft test -h" works feel too magical; how about having users opt-in to this behavior with a new option on the action?
There was a problem hiding this comment.
another consideration is that even if a repository has rockcraft test-compliant tests, a failing test would fail the whole action, which is also surprising and a change in behavior.
There was a problem hiding this comment.
I added the opt-in flag, default to false. Check b8cb77d
| run-rockcraft-pack-action: | ||
| strategy: | ||
| matrix: | ||
| os: [ubuntu-24.04, ubuntu-22.04, ubuntu-20.04] |
There was a problem hiding this comment.
20.04 is end of standard support
Summary
This PR adds support for
rockcraft testcommand as part of the build workflow, sincerockcraft testimplicitly runsrockcraft packbefore calling spread.This behaviour prevents us from adding
rockcraft testas another job inside OCI Factory Test-Rock workflow, as those rely on a previously packed rock by the Build workflow, 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.