snapcrafters / ci

Repository for shared CI tools and actions
https://github.com/snapcrafters/.github/wiki
MIT License
3 stars 7 forks source link

[Enhancement]: Equivalent testing action for non-GUI apps #17

Closed jnsgruk closed 9 months ago

jnsgruk commented 12 months ago

What changes would you like?

This set of actions provides get-screenshot for GUI apps, but nothing for CLI apps. It would be good to include an equivalent so that CLI apps could be tested, and the output posted on the call for testing issue like that screenshots are.

Something like:

steps:
    - name: Test the snap
      uses: snapcrafters/ci/test-snap@main
      with:
        test-script: |
          # At this point, the revision under test is already installed in the environment
          snap run snap_name --version
          snap run snap_name do_something

Whatever the output of the test-script should then be added as a comment.

Any extra information?

No response

SamirPS commented 12 months ago

For this action, can the input also be a file?

popey commented 11 months ago

The Jenkins snap could launch https://localhost:8080 to show the jenkins admin interface.