Open Hook25 opened 11 months ago
As the description of the input mentions, snapcraft-args
was intended to let a snap opt into experimental features:
It is not intended to let you run arbitrary snapcraft commands, and doing so is an unsupported configuration. Given that most of the code in this action deals with wrangling the build environment to get LXD working (which isn't needed by snapcraft remote-build
), you might be better off not using the action at all.
If you just want snapcraft available for your job, you can run sudo snap install --classic snapcraft
in a step.
Description
In checkbox we use this action to trigger remote builds via snapcraft. Right now we don't get any failure out of it even when it actually should fail because as long as at least one snap is produced the action will pass (Snapcraft never returns 1 due toremote-build failing). This is a problem in general, but specifically right now we are dealing with some flaky builds and we are unable to retry them because we have no way of knowing if snapcraft failed or not.
This introduces a new check after a build is done, comparing the amount of requested artifacts (namely: 1 for any build that does not include a
--build-(on|for)
) against the number that is actually produced. If the two differ, an error is raisedTesting
This introduces two new tests (and fixes the text for 0 snaps), to test that a mismatch between requested and produced always fails. I have tested this contribution via
npm test
andnpm run all