GitHub Actions
- Create an access token on GitHub with access to workflow scope:
- Create a workflow in a GitHub repository. Go to “Actions” tab in repository and click “Create Workflow” button. Then you will get a workflow template. A workflow filename will be used by Testomatio to call a specific workflow.
- This workflow will be used solely by Testomatio so it should start only on
workflow_dispatch
event. The event should be defined with the following input parameters:
- The job should include a step where the test runner is executed with
--grep
option and TESTOMATIO environment variables passed in. For instance:
- Connect a GitHub Actions CI in Testomatio:
You will need to enter the following
- GitHub Username
- OAuth token (created at step 1)
- organization/repository (or user/repository)
- workflow name, a file name with a workflow, like
testomatio.yml
- Save your connection
- Now, open “Configuration” tab and check the default
ref
value.ref
is a target branch or a tag on which a tests will be executed. By default, it is set tomaster
(most of the repositories still use master as the main branch name, but we will adjust defaults accordingly when things change), but you can choose a different one, likemain
. run
andtestomatio
inputs are passed from Testomatio. Enable them on Input Variables tab
You can pass more input variables if you set them in Environment Configuration
- When the connection is saved, open a test and select “Run in CI”. Select a target ref and click “Launch”
- This will start a new job in GitHub Actions, please check that the job was successfully triggered and completed. After the job has finished a run report will be available on Runs page of Testomatio