Skip to content

restk-org/setup-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

restk-org/setup-cli GitHub Action

Install restk-cli in your GitHub Actions workflow for API testing.

Usage

jobs:
  api-tests:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Install restk-cli
        uses: restk-org/setup-cli@v1
        with:
          version: latest    # or "1.0.0" for pinned version

      - name: Run API tests
        run: restk-cli run --preset ./restk/runners/smoke.runner.yaml --dir ./restk --env staging

Inputs

Input Default Description
version latest CLI version (latest or semver like 1.0.0)
channel production Release channel (production or staging)

Outputs

Output Description
version Installed CLI version string
path Full path to the binary

Features

  • Auto-detects OS and architecture (Linux, macOS, Windows × amd64, arm64)
  • Caches binary between runs (keyed by version + platform)
  • Verifies download with HTTP status check
  • Adds to $GITHUB_PATH automatically

Examples

Pin to specific version

- uses: restk-org/setup-cli@v1
  with:
    version: '1.0.0'

Use staging channel

- uses: restk-org/setup-cli@v1
  with:
    channel: staging

Full workflow — run tests and upload results

name: API Tests
on: [push, pull_request]

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: restk-org/setup-cli@v1

      - name: Run smoke tests
        run: restk-cli run --preset ./restk/runners/smoke.runner.yaml --dir ./restk --env staging --output results.json

      - name: Upload results
        if: always()
        uses: actions/upload-artifact@v4
        with:
          name: api-test-results
          path: results.json

Publishing this Action

To publish to the GitHub Marketplace:

  1. Create a new repo: github.com/restk-org/setup-cli
  2. Copy action.yml and README.md to the repo root
  3. Tag: git tag -a v1 -m "v1.0.0" && git push origin v1
  4. Publish to Marketplace via GitHub UI

About

Install restk-cli in GitHub Actions — API testing, collection runner, import/export

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors