-
Notifications
You must be signed in to change notification settings - Fork 1
72 lines (59 loc) · 2.17 KB
/
android-page-load.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
name: Run Appium Tests and Send to Firebase
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *" # Run every day at midnight
jobs:
run-appium-tests:
runs-on:
- self-hosted
- macOS
- X64
- firebase-perf-reverse-proxy
env:
ANDROID_PERFORMANCE_GA_SERVICE_ACCOUNT: ${{ secrets.ANDROID_PERFORMANCE_GA_SERVICE_ACCOUNT }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r ./android-performance/requirements.txt
pip install Appium-Python-Client
pip install gspread google-auth
- name: Start Appium Server
run: |
appium & # Start Appium server in the background
sleep 5 # Wait for the server to start
- name: Set Network Type and Timestamp
run: |
echo "NETWORK_TYPE=5G" >> $GITHUB_ENV
echo "TIMESTAMP=$(date '+%Y%m%d_%H%M%S')" >> $GITHUB_ENV
- name: Start Network Throttling
run: |
bash ./android-performance/network_throttle start 5G
- name: Run Appium Tests - Chrome
run: |
python ./android-performance/chrome.py --network ${{ env.NETWORK_TYPE }} --timestamp ${{ env.TIMESTAMP }}
env:
NETWORK_TYPE: ${{ env.NETWORK_TYPE }}
TIMESTAMP: ${{ env.TIMESTAMP }}
- name: Run Appium Tests - Firefox
run: |
python ./android-performance/firefox.py --network ${{ env.NETWORK_TYPE }} --timestamp ${{ env.TIMESTAMP }}
env:
NETWORK_TYPE: ${{ env.NETWORK_TYPE }}
TIMESTAMP: ${{ env.TIMESTAMP }}
- name: Add Performance Difference Firefox vs. Chrome
run: |
python ./android-performance/add_perf_diff.py --network ${{ env.NETWORK_TYPE }} --timestamp ${{ env.TIMESTAMP }}
env:
NETWORK_TYPE: ${{ env.NETWORK_TYPE }}
TIMESTAMP: ${{ env.TIMESTAMP }}
- name: Upload Test Results
run: |
python ./android-performance/upload_test_results.py