-
Notifications
You must be signed in to change notification settings - Fork 3.1k
118 lines (112 loc) · 4 KB
/
safari_technology_preview.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
107
108
109
110
111
112
113
114
115
116
117
118
name: "All Tests: Safari Technology Preview"
# We never interact with the GitHub API, thus we can simply disable all
# permissions the GitHub token would have.
permissions: {}
on:
workflow_dispatch:
workflow_run:
workflows: [epochs]
types:
- completed
push:
branches:
- epochs/three_hourly
- triggers/safari_preview
env:
# Set SAFARIDRIVER_DIAGNOSE to true to enable safaridriver diagnostics. The
# logs won't appear in `./wpt run` output but will be uploaded as an
# artifact.
SAFARIDRIVER_DIAGNOSE: false
jobs:
check-workflow-run:
name: "Check for appropriate epochs"
uses: ./.github/workflows/check-workflow-run.yml
with:
check-refs: '["refs/heads/epochs/three_hourly"]'
permissions:
actions: read
safari-technology-preview-results:
name: "All Tests: Safari Technology Preview"
needs: check-workflow-run
if: |
github.event_name != 'workflow_run' || fromJSON(needs.check-workflow-run.outputs.updated-refs)[0] != null
runs-on:
- self-hosted
- webkit-ews
timeout-minutes: 180
strategy:
matrix:
current-chunk: [1, 2, 3, 4, 5, 6, 7, 8]
total-chunks: [8]
steps:
- name: checkout
uses: actions/[email protected]
with:
fetch-depth: 1
- name: Enable safaridriver diagnostics
if: env.SAFARIDRIVER_DIAGNOSE == true
run: |-
rm -rf ~/Library/Logs/com.apple.WebDriver/
defaults write com.apple.WebDriver DiagnosticsEnabled 1
- name: Enable safaridriver
run: |-
set -eux -o pipefail
export SYSTEM_VERSION_COMPAT=0
./wpt install --channel preview --download-only -d . --rename STP safari browser
sudo installer -pkg STP.pkg -target LocalSystem
sudo /Applications/Safari\ Technology\ Preview.app/Contents/MacOS/safaridriver --enable
- name: Update hosts
run: |-
set -eux -o pipefail
./wpt make-hosts-file | sudo tee -a /etc/hosts
- name: Update manifest
run: ./wpt manifest
- name: Run tests
run: |-
set -eux -o pipefail
export SYSTEM_VERSION_COMPAT=0
./wpt run \
--no-manifest-update \
--no-restart-on-unexpected \
--no-fail-on-unexpected \
--this-chunk=${{ matrix.current-chunk }} \
--total-chunks=${{ matrix.total-chunks }} \
--chunk-type hash \
--log-wptreport ${{ runner.temp }}/wpt_report_${{ matrix.current-chunk }}.json \
--log-wptscreenshot ${{ runner.temp }}/wpt_screenshot_${{ matrix.current-chunk }}.txt \
--log-mach - \
--log-mach-level info \
--channel experimental \
--kill-safari \
--max-restarts 100 \
safari
- name: Publish results
uses: actions/[email protected]
with:
name: safari-technology-preview-results-${{ matrix.current-chunk }}
path: |
${{ runner.temp }}/wpt_report_*.json
${{ runner.temp }}/wpt_screenshot_*.txt
if-no-files-found: "error"
- name: Publish safaridriver logs
if: env.SAFARIDRIVER_DIAGNOSE == true
uses: actions/[email protected]
with:
name: safaridriver-logs-${{ matrix.current-chunk }}
path: ~/Library/Logs/com.apple.WebDriver/
if-no-files-found: warn
- name: Disable safaridriver diagnostics
if: env.SAFARIDRIVER_DIAGNOSE == true
run: |-
defaults write com.apple.WebDriver DiagnosticsEnabled 0
rm -rf ~/Library/Logs/com.apple.WebDriver/
- name: Cleanup
if: always()
run: |-
set -ux
sudo sed -i '' '/^# Start web-platform-tests hosts$/,/^# End web-platform-tests hosts$/d' /etc/hosts
safari-technology-preview-results-notify:
needs: safari-technology-preview-results
uses: ./.github/workflows/wpt_fyi_notify.yml
with:
artifact-name: 'safari-technology-preview-results-*'