Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 30 additions & 28 deletions .github/workflows/action.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,34 @@
name: 'BrowserStack'
on: [push, pull_request]
name: Github Actions Example

on:
pull_request:
push:
branches:
- master

jobs:
ubuntu-job:
name: 'BrowserStack Test on Ubuntu'
test:
name: Running Units Tests
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x, 16.x, 18.x]

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
- name: 'BrowserStackLocal Setup'
uses: 'browserstack/github-actions/setup-local@master'
with:
local-testing: start
local-logging-level: all-logs
local-identifier: random
- name: 'checkout the repository demo'
uses: 'actions/checkout@v2'
- name: 'running npm install'
run: 'npm install'
- name: 'running http-server'
run: './node_modules/.bin/http-server -p 8099 &'
- name: 'run test'
run: 'node index.js'
- name: 'BrowserStackLocal Stop'
uses: 'browserstack/github-actions/setup-local@master'
with:
local-testing: stop
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
- name: 'BrowserStack Env Setup' # Invokes the setup-env action
uses: browserstack/github-actions/setup-env@master
with:
username: ${{ secrets.BROWSERSTACK_USERNAME }}
access-key: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
- name: 'BrowserStack Local Tunnel Setup' # Invokes the setup-local action
uses: browserstack/github-actions/setup-local@master
with:
local-testing: start
local-identifier: random
- name: Install
run: npm install selenium-webdriver
- name: Test
run: npm run test