Skip to content

Commit

Permalink
[Azure Pipelines] Run tools/ pytest tests (via tox)
Browse files Browse the repository at this point in the history
The tools/wpt/ tests are integration tests and require both Chrome and
Firefox to be installed.
  • Loading branch information
foolip committed Nov 6, 2018
1 parent d438fc2 commit ba06747
Showing 1 changed file with 59 additions and 6 deletions.
65 changes: 59 additions & 6 deletions .azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# macOS. Documentation to help understand this setup:
# https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema
# https://docs.microsoft.com/en-us/azure/devops/pipelines/process/variables
# https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/index

trigger: none # disable builds for branches

Expand All @@ -26,9 +27,65 @@ jobs:
- script: |
sudo easy_install pip
sudo pip install -U virtualenv
pip install --user tox virtualenv
echo "##vso[task.prependpath]$HOME/Library/Python/2.7/bin"
displayName: 'Install Python packages'
condition: variables.run_wptrunner_infrastructure
condition: |
or(variables.run_tools_unittest,
variables.run_wptrunner_unittest,
variables.run_wpt_integration,
variables.run_wptrunner_infrastructure)
- script: tox -c tools/ -e py27 -- --junitxml=results.xml
displayName: 'Run tools/ unittests'
condition: variables.run_tools_unittest

- task: PublishTestResults@2
inputs:
testResultsFiles: 'tools/results.xml'
testRunTitle: 'tools/ pytest'
displayName: 'Publish tools/ unittests results'
condition: variables.run_tools_unittest

- script: tox -c tools/wptrunner/ -e py27-base,py27-safari -- --junitxml=results.xml
displayName: 'Run tools/wptrunner/ unittests'
condition: variables.run_wptrunner_unittest

- task: PublishTestResults@2
inputs:
testResultsFiles: 'tools/wptrunner/results.xml'
testRunTitle: 'tools/wptrunner/ pytest'
displayName: 'Publish tools/wptrunner/ unittests results'
condition: variables.run_wptrunner_unittest

- script: ./wpt make-hosts-file | sudo tee -a /etc/hosts
displayName: 'Update /etc/hosts'
condition: |
or(variables.run_wpt_integration,
variables.run_wptrunner_infrastructure)
- script: HOMEBREW_NO_AUTO_UPDATE=1 brew cask install Homebrew/homebrew-cask-versions/google-chrome-canary
displayName: 'Install Chrome Canary'
condition: |
or(variables.run_wpt_integration,
variables.run_wptrunner_infrastructure)
- script: HOMEBREW_NO_AUTO_UPDATE=1 brew cask install Homebrew/homebrew-cask-versions/firefox-nightly
displayName: 'Install Firefox Nightly'
condition: |
or(variables.run_wpt_integration,
variables.run_wptrunner_infrastructure)
- script: tox -c tools/wpt/ -e py27 -- --junitxml=results.xml
displayName: 'Run tools/wpt/ tests'
condition: variables.run_wpt_integration

- task: PublishTestResults@2
inputs:
testResultsFiles: 'tools/wpt/results.xml'
testRunTitle: 'tools/wpt/ pytest'
displayName: 'Publish tools/wpt/ test results'
condition: variables.run_wpt_integration

# Installig Ahem in /Library/Fonts instead of using --install-fonts is a
# workaround for https://github.com/web-platform-tests/wpt/issues/13803.
Expand Down Expand Up @@ -60,10 +117,6 @@ jobs:
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: ./wpt manifest
displayName: 'Update manifest'
condition: variables.run_wptrunner_infrastructure
Expand Down

0 comments on commit ba06747

Please sign in to comment.