id | title | hide_title | sidebar_label | description | keywords | url | site_name | slug | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
github-actions-with-hyperexecute |
GitHub Actions Integration |
true |
GitHub Actions |
LambdaTest now integrates with GitHub Actions Pipeline to boost your go-to market delivery. Perform automated cross browser testing with LambdaTest to ensure your development code renders seamlessly through an online Selenium grid providing 3000+ real browsers running through machines. |
|
LambdaTest |
github-actions-with-hyperexecute/ |
GitHub Actions is a continuous integration and continuous delivery (CI/CD) platform that allows you to automate your build, test, and deployment pipeline. You can create workflows that build and test every pull request to your repository, or deploy merged pull requests to production.
This document will show you how to integrate GitHub Actions Pipeline with HyperExecute to greatly shorten your test cycles.
To integrate GitHub Actions Pipeline with HyperExecute, follow the below steps:
- Navigate to the main page of the repository.
- Under your repository name, click Actions.
In the left sidebar, click the New workflow button.
<img loading="lazy" src={require('../assets/images/hyperexecute/integration/ci-cd/github/github_new_workflow.png').default} alt="Create New Project" width="" height=""/>
To create the GitHub Actions pipeline YAML file, follow the sample command below:
name: Hyperexecute-Playwright
on:
workflow_dispatch:
inputs:
username:
required: true
description: LT Username
accessKey:
description: LT Access Key
required: true
sampleRepoLink:
description: Link to the HyperExecute sample repo
default: https://github.com/prateekLambda/HyperExecute-Playwright-Vanilla-Javascript
required: true
jobs:
HyperExecute-Playwright:
runs-on: ${{ matrix.os }}
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
os: [windows-latest]
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Starting CLI testing
shell: bash
run: |
echo "STEP 1 ) Downloading sample suite"
git clone ${{ github.event.inputs.sampleRepoLink }}
echo "STEP 2) Download CLI and setting environment variables"
cd HyperExecute-Playwright-Vanilla-Javascript
curl https://downloads.lambdatest.com/hyperexecute/windows/hyperexecute.exe -o hyperexecute.exe
export LT_USERNAME=${{ github.event.inputs.username }}
export LT_ACCESS_KEY=${{ github.event.inputs.accessKey }}
echo $LT_USERNAME
echo $LT_ACCESS_KEY
./hyperexecute --user $LT_USERNAME --key $LT_ACCESS_KEY --config yaml/win/.hyperexecute_autosplits.yaml
- On:
- Workflow_dispatch: In the workflow_dispatch section, you should declare the pre-defined variables that will be used before running the GitHub Actions PipeLine as an input.
- Jobs:
In the Jobs Section, declare the workflow of the pipeline execution.
- runs-on: Runs-on contains the value of the OS flavor you would like to execute the GitHub Actions Pipeline on.
- Steps:
In the steps section, you should declare the execution commands.
- The first step in the above sample YAML changes the path of the root directory.
- In the second step it downloads the HyperExecute CLI binary.
- The third step is the execution command which executes The Hyperexecute CLI binary. This contains LambdaTest username, access key, and path of the Yaml created for Hyperexecute. You can find more information on this here.
<img loading="lazy" src={require('../assets/images/hyperexecute/integration/ci-cd/github/github_action_yaml.png').default} alt="Create New Pipeline" width="" height=""/>
To run the new pipeline that you just created, click the Run workflow button on the workflow page. <img loading="lazy" src={require('../assets/images/hyperexecute/integration/ci-cd/github/run_workflow.png').default} alt="Create New Project" width="" height=""/>
Below is an example of how a test that is run on the GitHub Actions pipeline gets executed: <img loading="lazy" src={require('../assets/images/hyperexecute/integration/ci-cd/github/githubactions_example.png').default} alt="Create New Project" width="" height=""/>
Below is an example of a Hyperexecute job that was triggered through the above pipeline: <img loading="lazy" src={require('../assets/images/hyperexecute/integration/ci-cd/github/githubactions_execution.png').default} alt="Create New Project" width="" height=""/>
Run your tests at speeds never seen before. Happy testing! :)