-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add workflow for Safari Technology Preview
- Loading branch information
Showing
1 changed file
with
107 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
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: | ||
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 | ||
|
||
# Enable GitHub Actions debug logging. | ||
ACTIONS_RUNNER_DEBUG: true | ||
|
||
jobs: | ||
safari-technology-preview-results: | ||
name: "All Tests: Safari Technology Preview" | ||
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 | ||
defaults write com.apple.SafariTechnologyPreview WebKitJavaScriptCanOpenWindowsAutomatically 1 | ||
- 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 \ | ||
infrastructure | ||
- 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: |- | ||
rm -rf ~/Library/Logs/com.apple.WebDriver/ | ||
defaults write com.apple.WebDriver DiagnosticsEnabled 0 | ||
- 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-*' |