Skip to content

Commit d86e282

Browse files
committed
Azure Pipelines
1 parent 3432729 commit d86e282

File tree

3 files changed

+42
-6
lines changed

3 files changed

+42
-6
lines changed

.azure-pipelines.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema
2+
3+
jobs:
4+
- job: macOS
5+
6+
pool:
7+
vmImage: 'macOS 10.13'
8+
9+
steps:
10+
- script: |
11+
sw_vers
12+
./tools/ci/install.sh
13+
displayName: 'Install Safari Technology Preview'
14+
15+
- script: |
16+
no_proxy='*' ./wpt run --yes --manifest MANIFEST.json --metadata infrastructure/metadata/ --channel=preview safari_webdriver infrastructure/
17+
# fail if safaridriver was left running (killall fails if it's not running)
18+
killall -0 safaridriver 2> /dev/null && echo "ERROR: safaridriver left running" && exit 1
19+
displayName: 'infrastructure/ tests'
20+
21+
- script: no_proxy='*' ./wpt run --yes --no-pause --no-restart-on-unexpected --no-fail-on-unexpected --log-wptreport=../wpt_report.json --channel=preview safari_webdriver quirks/
22+
displayName: 'quirks/ tests'

tools/ci/before_install.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ RELEVANT_CHANGES=$(echo "$RELEVANT_JOBS" | grep $JOB || true)
66
if [[ -z ${RUN_JOB+x} && ! -z $RELEVANT_CHANGES ]] || [[ $RUN_JOB -eq 1 ]]; then
77
export RUN_JOB=1
88
git submodule update --init --recursive 1>&2
9-
export DISPLAY=:99.0
10-
sh -e /etc/init.d/xvfb start 1>&2
9+
if [[ -e /etc/init.d/xvfb ]]; then
10+
export DISPLAY=:99.0
11+
sh -e /etc/init.d/xvfb start 1>&2
12+
fi
1113
# For uploading the manifest
1214
export WPT_MANIFEST_FILE=$HOME/meta/MANIFEST-$(git rev-parse HEAD).json
1315
elif [[ -z ${RUN_JOB+x} ]]; then

tools/ci/install.sh

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,19 @@ set -ex
44
WPT_ROOT=$(cd $(dirname "$0")/../.. && pwd -P)
55
cd $WPT_ROOT
66

7-
if [[ $RUN_JOB -eq 1 ]]; then
8-
pip install -U setuptools
9-
pip install -U requests
10-
fi
7+
which pip || sudo easy_install pip
8+
9+
sudo pip install -U setuptools
10+
sudo pip install -U requests
11+
sudo pip install -U virtualenv
12+
13+
HOMEBREW_NO_AUTO_UPDATE=1 brew cask install Homebrew/homebrew-cask-versions/safari-technology-preview
14+
# https://web-platform-tests.org/running-tests/safari.html
15+
sudo "/Applications/Safari Technology Preview.app/Contents/MacOS/safaridriver" --enable
16+
defaults write com.apple.Safari WebKitJavaScriptCanOpenWindowsAutomatically 1
17+
# https://github.com/web-platform-tests/results-collection/blob/master/src/scripts/trust-root-ca.sh
18+
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain tools/certs/cacert.pem
19+
./wpt make-hosts-file | sudo tee -a /etc/hosts
20+
21+
# https://github.com/web-platform-tests/results-collection/issues/218 workaround
22+
sudo cp fonts/Ahem.ttf /Library/Fonts

0 commit comments

Comments
 (0)