-
Notifications
You must be signed in to change notification settings - Fork 145
60 lines (52 loc) · 1.91 KB
/
blade-browserstack.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Blade BrowserStack E2E Tests
# Runs the action when
# 1. 'Run Interaction Tests' label is added to PR
# 2. Workflow is trigerred manually
# 3. PR is merged to master
on:
pull_request:
types: [labeled]
push:
branches:
- master
env:
GITHUB_ACCESS_TOKEN: ${{ secrets.CI_BOT_TOKEN }}
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }}
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
jobs:
browserstack-job:
name: Blade BrowserStack E2E Tests
runs-on: ubuntu-latest # nosemgrep: non-self-hosted-runner
if: ${{ github.event_name == 'workflow_dispatch' || github.event.label.name == 'Run Interaction Tests' || github.event_name == 'push' }}
steps:
- 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: blade
- name: Checkout Codebase
uses: actions/checkout@v3
- name: Use Node v18
uses: actions/setup-node@v3
with:
node-version: 18.12.1
- name: Setup Cache & Install Dependencies
uses: ./.github/actions/install-dependencies
- name: Run Storybook
run: |
yarn react:storybook:build
yarn react:storybook:serve &
working-directory: packages/blade
- name: 'Run E2E Tests'
run: |
yarn e2e:bstack
working-directory: packages/blade
- name: 'BrowserStackLocal Stop' # Terminating the BrowserStackLocal tunnel connection
uses: browserstack/github-actions/setup-local@master
with:
local-testing: stop