diff --git a/.github/workflows/cli-publish-snap.yml b/.github/workflows/cli-publish-snap.yml new file mode 100644 index 000000000..43dc84e36 --- /dev/null +++ b/.github/workflows/cli-publish-snap.yml @@ -0,0 +1,23 @@ +name: Publish Testflinger CLI snap to edge +on: + push: + branches: ["main"] + paths: + - cli/** + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: snapcore/action-build@v1 + id: build + with: + path: cli + - uses: snapcore/action-publish@v1 + env: + SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAP_STORE_LOGIN }} + with: + snap: ${{ steps.build.outputs.snap }} + release: edge diff --git a/.github/workflows/server-charm-release-edge.yml b/.github/workflows/server-charm-release-edge.yml index 443f2f39d..0e2ac0282 100644 --- a/.github/workflows/server-charm-release-edge.yml +++ b/.github/workflows/server-charm-release-edge.yml @@ -6,6 +6,7 @@ on: - main paths: - server/** + workflow_dispatch: jobs: build: diff --git a/cli/README.rst b/cli/README.rst index 520cd4f9f..5f8d0304d 100644 --- a/cli/README.rst +++ b/cli/README.rst @@ -12,11 +12,19 @@ the status of them, and getting results. Installation ------------ -You can either run testflinger-cli from a checkout of the code, or -install it like any other python project. +It is recommended that you install testflinger-cli from the snap, however it +can also be installed with pip directly from the source. -To run it from a checkout, please make sure to first install python3-click -and python3-requests +To install testflinger using the snap: + +.. code-block:: console + + $ sudo snap install testflinger-cli + +When changes are made to the CLI, the snap is automatically built and uploaded +to the `edge` channel. Once sufficient testing has been performed, this snap +is also published to the `stable` channel. If you prefer to use the latest +code, then you can specify `edge` instead in the command above. To install it in a virtual environment: