GitHub Action that downloads scanii-cli, starts it as a background server on localhost:4000, and waits for readiness — so your SDK tests have a local mock API without any credentials or network calls. Learn more at scanii.com.
- uses: scanii/setup-cli-action@v1
- run: your-test-command| Input | Required | Default | Description |
|---|---|---|---|
version | No | latest | scanii-cli version to install. Accepts latest or a semver string without a leading v (e.g., 1.3.0). |
callback-delay | No | 0 | Duration to delay callback delivery. Accepts Go duration strings (e.g. 500ms, 1s). Passed through as --callback-wait to scanii-cli. |
| Output | Description |
|---|---|
version | The actual version installed (resolved from latest when applicable). |
endpoint | Always http://localhost:4000. Exposed so consumers can reference ${{ steps.setup.outputs.endpoint }} instead of hardcoding. |
- uses: actions/checkout@v4
- name: Setup scanii-cliid: scaniiuses: scanii/setup-cli-action@v1
- name: Run SDK testsrun: mvn -B verifyenv:
SCANII_ENDPOINT: ${{ steps.scanii.outputs.endpoint }}SCANII_KEY: keySCANII_SECRET: secretThe server starts with credentials key / secret. These are scanii-cli's fixed test credentials — they are not real Scanii API keys.
For a complete copy-pasteable workflow, see examples/basic.yml.
Works on ubuntu-latest, macos-latest, and windows-latest. Requires scanii-cli >= 1.3.0.
This is a composite action — no JavaScript, no Docker, no build step.
Apache 2.0 — see LICENSE.