-
-
Notifications
You must be signed in to change notification settings - Fork 137
56 lines (56 loc) · 2.07 KB
/
safari.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
name: OSX Safari
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: macos-13
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '18.x'
- name: Install browsertime
run: npm ci
- name: Install python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies
run: |
sudo safaridriver --enable
sudo rm '/usr/local/bin/2to3'
brew update
brew install ffmpeg
python -m pip install --upgrade --user pip
python -m pip install --upgrade --user setuptools
python -m pip install --user pyssim OpenCV-Python Numpy
python -m pip --version
python -m pip show Pillow
python -m pip show pyssim
system_profiler SPDisplaysDataType |grep Resolution
ffmpeg -version
- name: List all simulators
run: xcrun xctrace list devices
- name: Boot iPhone 14
run: |
IPHONE14=$(xcrun xctrace list devices 2>&1 | grep -m 1 "iPhone 14 Simulator" | awk -F'[()]' '{print $4}')
xcrun simctl boot $IPHONE14
- name: Start local HTTP server
run: (npm run start-server&)
- name: Test Safari without video
run: ./bin/browsertime.js -b safari -n 1 http://127.0.0.1:3000/simple/
#- name: Test Safari iOS simulator
# run: |
# IPHONE14=$(xcrun xctrace list devices 2>&1 | grep -m 1 "iPhone 14 Simulator" | awk -F'[()]' '{print $4}')
# ./bin/browsertime.js -b safari -n 1 --safari.useSimulator --video --visualMetrics --safari.deviceUDID $IPHONE14 https://www.sitespeed.io/
- name: Test Safari with video and Visual Metrics
run: ./bin/browsertime.js -b safari -n 1 --viewPort 800x600 --video --visualMetrics http://127.0.0.1:3000/simple/
- name: Test Safari with video and Visual Metrics for multi pages
run: ./bin/browsertime.js -b safari -n 1 --viewPort 800x600 --video --visualMetrics test/data/navigationscript/multi.cjs