Skip to content

Instantly share code, notes, and snippets.

@Vinay08sharma
Created August 9, 2022 17:40
Show Gist options
  • Save Vinay08sharma/b6f47f1733575caa4cce89934102de20 to your computer and use it in GitHub Desktop.
Save Vinay08sharma/b6f47f1733575caa4cce89934102de20 to your computer and use it in GitHub Desktop.
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: webdriverio-ci
on:
workflow_dispatch:
inputs:
environment:
description: 'Environment to run tests against'
type: choice
required: true
options:
- staging
- prod
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 16.3.0
- name: Install
run: npm install
- name: Running Test
run: BROWSERSTACK_USERNAME=${{secrets.BROWSERSTACK_USERNAME}} BROWSERSTACK_ACCESS_KEY=${{secrets.BROWSERSTACK_ACCESS_KEY}} npm run test --env ${{ inputs.environment }}
- uses: actions/upload-artifact@v1
if: failure()
with:
name: logs
path: logs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment