GitHub modules

The automation tools module for GitHub starts workflows in GitHub Actions (opens in new tab) directly from Tosca Cloud.

Run GitHub Workflow

The module Run GitHub Workflow starts a GitHub Actions workflow (opens in new tab) from your test case and waits until it finishes. The module uses the values from the test step and works without custom scripts.

Before you use this module, connect your workflow to Tosca Cloud. To learn how, check out Connect your Playwright workflow.

Value

Description

Repository

Path of the GitHub repository that contains the workflow, in the format <owner>/<repository>. For example, vehicle-insurance-company/playwright-tests.

Workflow

File name of the workflow, for example playwright-tosca.yml. Enter the file name without the path. The workflow needs a workflow_dispatch trigger (opens in new tab). This trigger allows Tosca Cloud to start the workflow when your test case runs.

Ref (optional)

Name of the branch (opens in new tab) to run the workflow from. If you leave this value empty, the module uses main.

Token

Expression for the parameter that contains your GitHub personal access token, for example {CP[GitHubToken]}. Use the data type Secret. The module uses the token to authenticate with GitHub. The token needs read and write access to Actions in the repository.

Timeout (optional)

Time in seconds that Tosca Cloud waits for the workflow to finish. The default timeout is 3600 seconds (one hour).

Start a Playwright workflow

In this example, Run GitHub Workflow starts the workflow playwright-tosca.yml in the repository vehicle-insurance-company/playwright-tests:

  • Repository has the value vehicle-insurance-company/playwright-tests and uses action mode Input.

  • Workflow has the value playwright-tosca.yml and uses action mode Input.

  • Token has the value {CP[GitHubToken]}, the data type Secret, and uses action mode Input.

  • Ref and Timeout are empty. The module uses the main branch and waits up to 3600 seconds.

The Playwright results then show up on the Test runs page.

Test step Run GitHub Workflow with the values Repository, Workflow, and Token.

Click to enlarge: Start a Playwright workflow