Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
check-circle

GitHub Action

Saucectl Run Action

v2.1.1

Saucectl Run Action

check-circle

Saucectl Run Action

A GitHub action to run your tests on Sauce Labs

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Saucectl Run Action

uses: saucelabs/[email protected]

Learn more about this action in saucelabs/saucectl-run-action

Choose a version

Saucectl Run Action from Sauce Labs

This action installs saucectl and launches tests.
You can use it to run your tests on Sauce Labs !

Example

Basic

jobs:
  test:
    runs-on: ubuntu-latest
    name: Action Test
    steps:
      # ...
      - uses: saucelabs/saucectl-run-action@v2
        env:
          GITHUB_TOKEN: ${{ github.token }}
      # ...

⚠️ To avoid reaching API rate limit exceeded due to unauthenticated requests, be sure to provide GITHUB_TOKEN through env field.

Advanced

jobs:
  test:
    runs-on: ubuntu-latest
    name: Action Test
    steps:
      - uses: saucelabs/saucectl-run-action@v2
        env:
          GITHUB_TOKEN: ${{ github.token }}
        with:
          sauce-username: ${{ secrets.SAUCE_USERNAME }}
          sauce-access-key: ${{ secrets.SAUCE_ACCESS_KEY }}
          saucectl-version: v0.109.0
          working-directory: ./testrunner-toolkit/cypress/
          testing-environment: sauce

Inputs

saucectl-version

Version of saucectl to use.
Default: latest

sauce-username

Sauce Labs user name.

sauce-access-key

Sauce Labs Access Key.

working-directory

Folder in-which saucectl will be run.
Default: .

config-file

Configuration file to use with saucectl.
Default: .sauce/config.yml

This value is relative to working-directory.

region

Region flag to pass to saucectl.

Similar to --region <region> parameter available in saucectl.

skip-run

Skip execution of saucectl (only install binary).

select-suite

Select the suite to run.

Similar to --select-suite <suite> parameter available in saucectl.

concurrency

Concurency to use.

Similar to --ccy <ccy> parameter available in saucectl.

env

Environement variables to add.

Similar to -e parameter available in saucectl.

Due to github actions limitation, environement variables needs to be passed as a string.
Example:

      - uses: saucelabs/saucectl-run-action@v2
        with:
          sauce-username: ${{ secrets.SAUCE_USERNAME }}
          sauce-access-key: ${{ secrets.SAUCE_ACCESS_KEY }}
          env: |
            MY_FIRST_VAR=VALUE
            MY_SECOND_VAR=VALUE

show-console-log

Display console.log when tests succeed. Set to true to enable.

Similar to --show-console-log parameter available in saucectl.

logDir

Path where to store logs.

Similar to --logDir <path> parameter available in saucectl.