Skip to main content
Stably provides a dedicated GitHub Action that integrates seamlessly with your GitHub workflows. You can choose between blocking and non-blocking execution modes to fit your CI/CD pipeline needs.

Execution Modes

  • Blocking mode: Pipeline waits for test completion before proceeding
  • Non-blocking mode: Tests run asynchronously, results sent via Slack/email notifications

Setup Instructions

1

Create API Key Secret

First, get your API key from the settings page on the Web UI.Then, go to your GitHub repository, click on “Settings” > “Secrets and variables” > “Actions”. Create a new Repository Secret named STABLY_API_KEY and paste your API key into the secret value.
2

Get Test Suite ID

From a test suite’s page, click on the Add to CI button to get the code snippet that contains the test suite ID.
3

Create Workflow File

Create the file .github/workflows/stably.yaml in your GitHub repository and paste the code snippet there.

Basic Configuration

name: Stably Test Runner Example

on:
  pull_request:
  push:
    branches:
      - master

# You need to set these permissions if using the `github-comment` option
permissions:
  pull-requests: write
  contents: write

jobs:
  stably-test-action:
    name: Stably Test Runner
    runs-on: ubuntu-latest

    steps:
      - name: Global Setup
        run: echo "Running global setup tasks"

      - name: Stably Runner Action
        id: stably-runner
        uses: stablyai/stably-runner-action@v3
        with:
          api-key: ${{ secrets.STABLY_API_KEY }}
          test-suite-id: xxxxxxxxxxxxxxx # REPLACE WITH YOUR TEST SUITE ID

      - name: Global Tear Down
        run: echo "Running global tear down tasks"

Pull Request Testing

For PR testing, you can use environment variables and other parameters to customize test execution:
 - name: Stably Runner Action
   id: stably-runner
   uses: stablyai/stably-runner-action@v3
   with:
     api-key: ${{ secrets.STABLY_API_KEY }}
     test-suite-id: xxxxxxxxxxxxxxx # REPLACE WITH YOUR TEST SUITE ID

Advanced Configuration Options

The GitHub Action supports various options to customize test execution:
  • number-of-workers: Control parallel execution (1-10 workers)
  • retries: Set retry attempts for failed tests
  • repeats: Run each test multiple times for reliability testing
  • operation-delay-ms: Add delays between test operations
  • test-timeout-ms: Set individual test timeout limits
  • notification-profile: Configure result notifications
  • note: Add contextual information to test runs
  • environment: Specify test environment (PRODUCTION, STAGING, DEVELOPMENT) for variable overrides
  • variable-overrides: Override test variables with custom values (JSON format)

Adding Notes to Test Runs

When running multiple test suites concurrently, attach descriptive notes using the note parameter:
 - name: Stably Runner Action
   id: stably-runner
   uses: stablyai/stably-runner-action@v3
   with:
     api-key: ${{ secrets.STABLY_API_KEY }}
     test-suite-id: xxxxxxxxxxxxxxx # REPLACE WITH YOUR TEST SUITE ID
     note: PR for version 1.2.3
This feature allows you to:
  • Distinguish between concurrent test runs
  • Add contextual information to test executions
  • Improve test result tracking and analysis
I