GitHub Action
Setup mabl CLI
Github action to configure the
the mabl-cli
command-line client. It
installs the cli and configures it with an API key, if one is provided. Note
that API keys should be stored as secrets.
This action requires a version of Node.js be installed as part of your workflow.
The mabl-cli will be installed into that Node.js runtime.
See below for an example of how to install Node.js.
Note that the mabl CLI is in BETA. Some interfaces may change without prior notice.
version
{string} {optional} The version of the CLI to install. Defaults to the latest version if not specified.workspace-id
{string} {optional} A workspace id to configure. If provided, all future calls to the cli will use this workspace by default.
-
MABL_API_KEY
{string} {optional} If provided, this action will authenticate with the mabl CLI using theMABL_API_KEY
. This is required if you also pass in aworkspace-id
.The
MABL_API_KEY
should be stored as a repository secret and passed as in the example below. Never store yourMABL_API_KEY
in plain text in your workflow YAML.
- Requires Node.js to be installed as a prior step. This is most easily done with
the
actions/setup-node@v1
action.
on: [push]
name: mabl
jobs:
test:
name: Mabl Tests
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v1
with:
node-version: '12.x'
- uses: mablhq/setup-mabl-cli@v0.3
with:
version: 0.6.94-beta
workspace-id: V2pvHBJ-rprn1n3S4ELs3A-w
env:
MABL_API_KEY: ${{ secrets.MABL_API_KEY }}
- name: Download screenshots for test
run: mabl test-runs export ar5vXBJ-rpan1nSs445s3A-jr -f screenshots.zip
- name: Upload screenshots
uses: actions/upload-artifact@v2
with:
name: screenshots
path: screenshots.zip
See here for details on contributing to this action.
The Dockerfile and associated scripts and documentation in this project are released under the MIT License.