GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - browserstack/github-actions: A collection of GitHub Actions for BrowserStack. For internal reference: https://browserstack.atlassian.net/wiki/spaces/ENG/pages/1750928573/GitHub+Integration+via+GitHub+Actions

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace
BranchesTags
Open more actions menu

Latest commit

 

History

444 Commits
444 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
ai-evals
ai-evals
 
 
browserstack-report-action
browserstack-report-action
 
 
setup-env
setup-env
 
 
setup-local
setup-local
 
 
test-companion
test-companion
 
 
CODEOWNERS
CODEOWNERS
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
action.yml
action.yml
 
 

Repository files navigation

BrowserStack GitHub Actions

BrowserStack Logo

setup-env build status setup-local build status

This respository contains a library of GitHub Actions to help you integrate your test suite with the BrowserStack device cloud.

You need a BrowserStack username and access-key to run your tests on the BrowserStack device cloud. You can sign-up for free trial if you do not have an existing account.

If you want to test your open source project on BrowserStack, then sign-up here for lifetime free access to all our products.

Available Actions

  • setup-env: This Action helps in setting up the required environment variables that are to be used in your test scripts. The environment variables set up here shall be used by other BrowserStack actions as well for their functioning.

  • setup-local: This Action downloads and starts the appropriate BrowserStackLocal binary, thereby creating a secure tunnel connection from the GitHub Actions runner environment to the BrowserStack device cloud. This secure tunnel will be used by the remote browsers in BrowserStack to access your web application hosted in the GitHub Actions runner environment. You do not need this Action if the application to be tested is accessible over the public internet.

  • test-companion: Ask BrowserStack Test Companion for test work from a pull request. Comment @browserstack test this PR and it proposes the tests it would write, then writes them once someone with write access replies go. Needs a Linux runner. See its README for setup.

Prerequisites

  • You should set your BrowserStack Username and Access Key as GitHub Secrets, i.e. BROWSERSTACK_USERNAME and BROWSERSTACK_ACCESS_KEY respectively.

Usage

As this is a library of Actions, invoking this Action will trigger the setup-env Action internally. The following usage example will only set up the required environment variables:

- name: BrowserStack Action
  uses: 'browserstack/github-actions@master'
  with:
    username:  ${{ secrets.BROWSERSTACK_USERNAME }}
    access-key: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
    build-name: BUILD_INFO
    project-name: REPO_NAME

We recommend you to invoke the Actions individually depending on the use case. A sample workflow for the same is shown below. You can additionally refer to the individual README (setup-env, setup-local) of the Actions to know more about how they work, the inputs they support and their usage examples.

Sample Workflow with usage of both Actions

The workflow example below would be useful when the web application to be tested is hosted on the GitHub Actions runner environment, i.e. not accessible from the public Internet.

name: 'BrowserStack Test'
on: [push, pull_request]

jobs:
  ubuntu-job:
    name: 'BrowserStack Test on Ubuntu'
    runs-on: ubuntu-latest
    steps:
      - name: 'BrowserStack Env Setup'
        uses: 'browserstack/github-actions/setup-env@master'
        with:
          username:  ${{ secrets.BROWSERSTACK_USERNAME }}
          access-key: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
          build-name: BUILD_INFO
          project-name: REPO_NAME
      - name: 'BrowserStackLocal Setup'
        uses: 'browserstack/github-actions/setup-local@master'
        with:
          local-testing: start
          local-identifier: random

Note


Post these steps, you will have to build and run your application web server on the same runner environment. Further, invoke your test scripts by utilizing the environment variables that have been set by actions. For more detailed steps on how to integrate your test suite with BrowserStack on GitHub Actions, visit BrowserStack Documentation for the same.

After you are done running your tests, invoke the setup-local Action again with local-testing: stop as the input:

      - name: 'BrowserStackLocal Stop'
        uses: 'browserstack/github-actions/setup-local@master'
        with:
          local-testing: stop

Feature requests and bug reports

Please file feature requests and bug reports as github issues.

About

A collection of GitHub Actions for BrowserStack. For internal reference: https://browserstack.atlassian.net/wiki/spaces/ENG/pages/1750928573/GitHub+Integration+via+GitHub+Actions

Resources

Readme
MIT license
Activity
Custom properties

Stars

67 stars

Watchers

11 watching

Forks

43 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.