-
Notifications
You must be signed in to change notification settings - Fork 4
66 lines (51 loc) · 1.99 KB
/
qa_test_beta.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
name: Run QA Tests Beta
on:
workflow_dispatch:
inputs:
target:
description: 'Alternative to Refs above, URL to target tests (ex: https://beta.hydroshare.org).'
jobs:
build-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v3
with:
python-version: 3.9
- name: Install dependencies
run: pip3 install -r requirements.txt
- name: Prepare Selenium
run: sudo apt-get install -y chromium-browser
# - name: Prepare Firefox
# TODO: enable browser selection via GH dispatch
# # uses: browser-actions/setup-firefox@latest
# run: sudo apt install firefox
# - name: Firefox version
# run: firefox --version
# - name: Geckodriver
# run: sudo apt install firefox-geckodriver
- name: Create Output Dir
run: mkdir output
- name: Run Tests against target = ${{ github.event.inputs.target }}
if: github.event.inputs.target != ''
run: |
./hydrotest hydroshare HydroshareTestSuite --headless --browser chrome --base ${{ github.event.inputs.target }} 2>&1 | tee -a output/hydroshare-browser-test.txt
- name: Run Tests against beta
if: github.event.inputs.target == ''
run: |
./hydrotest hydroshare HydroshareTestSuite --headless --browser chrome --base https://beta.hydroshare.org/ 2>&1 | tee -a output/hydroshare-browser-test.txt
- name: Archive test results
uses: actions/upload-artifact@v3
with:
name: DSP-ARTIFACTS
path: output
- name: Archive debug
uses: actions/upload-artifact@v3
with:
name: HS-BETA-DEBUG
path: debug
- name: Check whether passing
working-directory: output
run: |
if grep -rl -e "FAILED (" -e "ERROR:" . >/dev/null; then grep -rh -e "FAIL:" -e "ERROR:" . && exit 1; else grep -rh "OK (" .; fi