Skip to content

Commit

Permalink
Add configuration for Azure Pipelines (#13769)
Browse files Browse the repository at this point in the history
This just runs infrastructure/ tests on relevant PRs, something minimal
and useful before trying to enable Azure Pipelines for the first time.

Part of #13299.

Next step: #13818
  • Loading branch information
foolip authored Oct 31, 2018
1 parent 25e7e16 commit 4098fe5
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 2 deletions.
63 changes: 63 additions & 0 deletions .azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# This is the configuration file for Azure Pipelines, used to run tests on
# macOS. Documentation to help understand this setup:
# https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema

trigger: none # disable builds for branches

jobs:
- job: macOS

pool:
vmImage: 'macOS-10.13'

steps:
- checkout: self
fetchDepth: 50
submodules: false

- script: |
echo "Test jobs:"
./wpt test-jobs | while read job; do
echo "$job"
echo "##vso[task.setvariable variable=run_$job]true";
done
displayName: 'List test jobs'
- script: |
sudo easy_install pip
sudo pip install -U virtualenv
displayName: 'Install Python packages'
condition: variables.run_wptrunner_infrastructure
# Installig Ahem in /Library/Fonts instead of using --install-fonts is a
# workaround for https://github.com/web-platform-tests/wpt/issues/13803.
- script: |
sudo cp fonts/Ahem.ttf /Library/Fonts
displayName: 'Install Ahem font'
condition: variables.run_wptrunner_infrastructure
- script: |
# https://github.com/web-platform-tests/results-collection/blob/master/src/scripts/trust-root-ca.sh
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain tools/certs/cacert.pem
displayName: 'Install web-platform.test certificate'
condition: variables.run_wptrunner_infrastructure
- script: |
# Pin to STP 67, as SafariDriver isn't working in 68:
# https://github.com/web-platform-tests/wpt/issues/13800
HOMEBREW_NO_AUTO_UPDATE=1 brew cask install https://raw.githubusercontent.com/Homebrew/homebrew-cask-versions/23fae0a88868911913c2ee7d527c89164b6d5720/Casks/safari-technology-preview.rb
# https://web-platform-tests.org/running-tests/safari.html
sudo "/Applications/Safari Technology Preview.app/Contents/MacOS/safaridriver" --enable
defaults write com.apple.Safari WebKitJavaScriptCanOpenWindowsAutomatically 1
displayName: 'Install Safari Technology Preview'
condition: variables.run_wptrunner_infrastructure
- script: |
./wpt make-hosts-file | sudo tee -a /etc/hosts
displayName: 'Update /etc/hosts'
condition: variables.run_wptrunner_infrastructure
- script: |
no_proxy='*' ./wpt run --yes --manifest MANIFEST.json --metadata infrastructure/metadata/ --channel=preview safari_webdriver infrastructure/
displayName: 'Run infrastructure/ tests'
condition: variables.run_wptrunner_infrastructure
4 changes: 2 additions & 2 deletions lint.whitelist
Original file line number Diff line number Diff line change
Expand Up @@ -317,10 +317,10 @@ SET TIMEOUT: resources/testharness.js
# setTimeout use in reftests
SET TIMEOUT: acid/acid3/test.html

# Travis
# CI configuration
WEB-PLATFORM.TEST: .azure-pipelines.yml
WEB-PLATFORM.TEST: .travis.yml


# Third party code
*: css/tools/apiclient/*
*: css/tools/w3ctestlib/*
Expand Down

0 comments on commit 4098fe5

Please sign in to comment.