generated from tweag/project
-
Notifications
You must be signed in to change notification settings - Fork 3
106 lines (91 loc) · 3.23 KB
/
ui_suites_workflow.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: BS - Web UI Suites Tests
env:
TAGS: 'web_tests'
BASE_URL: https://opensource-demo.orangehrmlive.com
BROWSERSTACK_USER: ${{secrets.BROWSERSTACK_API_USERNAME}}
BROWSERSTACK_ACCESS_KEY: ${{secrets.BROWSERSTACK_ACCESS_KEY}}
HRM_USER_NAME: ${{ secrets.HRM_USER_NAME }}
HRM_PASSWORD: ${{ secrets.HRM_PASSWORD }}
USING_ENV: "BROWSERSTACK"
on:
schedule:
- cron: '0 20 * * *'
workflow_dispatch:
inputs:
tags:
description: Gherkin Tags
required: true
default: 'web_tests'
jobs:
web-suites-regression:
strategy:
max-parallel: 1
fail-fast: true
matrix:
include:
- name: Win Chrome
baseurl: https://opensource-demo.orangehrmlive.com
tags: 'web_tests and healthcheck'
config_file: ./env_configs/win_chrome.json
html_report: win-chrome
suite_name: 'Health Check'
- name: Win Firefox
baseurl: https://opensource-demo.orangehrmlive.com
tags: 'web_tests and firefox and smoke'
config_file: ./env_configs/win_firefox.json
html_report: win-firefox
suite_name: 'Smoke'
- name: Win Edge
baseurl: https://opensource-demo.orangehrmlive.com
tags: 'web_tests and sanity'
config_file: ./env_configs/win_edge.json
html_report: win-edge
suite_name: 'Sanity'
- name: Mac Safari
baseurl: https://opensource-demo.orangehrmlive.com
tags: 'web_tests and regression'
config_file: ./env_configs/mac_safari.json
html_report: mac-safari
suite_name: 'Regression'
name: ${{ matrix.name }} - ${{ matrix.suite_name }}
runs-on: ubuntu-latest
steps:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.9"
- name: BrowserStack Env Setup
uses: browserstack/github-actions/setup-env@master
with:
username: ${{secrets.BROWSERSTACK_API_USERNAME}}
access-key: ${{secrets.BROWSERSTACK_ACCESS_KEY}}
- name: BrowserStack Local Tunnel Setup
uses: browserstack/github-actions/setup-local@master
with:
local-testing: start
local-identifier: random
- name: Check out code
uses: actions/checkout@v4
- name: Setup dependencies
run: |
sh setup_install.sh
- name: Run All Tests
run: |
env
source $HOME/.bp-venv/bin/activate
sh ci_run_web.sh ${{secrets.BROWSERSTACK_API_USERNAME}} ${{secrets.BROWSERSTACK_ACCESS_KEY}} "${{ matrix.config_file }}" "${{ matrix.tags }}" "${{ matrix.baseurl }}" "${{secrets.SLACK_WEBHOOK_URL}}" "${{secrets.TEAMS_WEBHOOK_URL}}"
- name: BrowserStackLocal Stop
uses: browserstack/github-actions/setup-local@master
with:
local-testing: stop
if: ${{ always() }}
- name: Upload HTML run report in the Artifacts Folder
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.html_report }}
path: |
./*.html
./output/
./assets/
./test_data/visualtesting/test/*.png
if: ${{ always() }}