mirror of https://github.com/Qiskit/qiskit.git
54 lines
2.2 KiB
YAML
54 lines
2.2 KiB
YAML
# Copyright 2017, IBM.
|
|
#
|
|
# This source code is licensed under the Apache License, Version 2.0 found in
|
|
# the LICENSE.txt file in the root directory of this source tree.
|
|
|
|
version: 1.0.{build}
|
|
|
|
environment:
|
|
matrix:
|
|
- PYTHON: C:\Python35
|
|
- PYTHON: C:\Python36
|
|
- PYTHON: C:\Python37
|
|
# Set Travis CI variables for skipping the CI-unavailable tests.
|
|
TRAVIS_PULL_REQUEST_SLUG: invalid
|
|
TRAVIS_REPO_SLUG: invalid-but-different
|
|
|
|
build: false
|
|
deploy: false
|
|
skip_branch_with_pr: true
|
|
|
|
install:
|
|
# If there is a newer build queued for the same PR, cancel this one.
|
|
# The AppVeyor 'rollout builds' option is supposed to serve the same
|
|
# purpose but it is problematic because it tends to cancel builds pushed
|
|
# directly to master instead of just PR builds (or the converse).
|
|
# credits: JuliaLang developers.
|
|
- ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod `
|
|
https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | `
|
|
Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { `
|
|
throw "There are newer queued builds for this pull request, failing early." }
|
|
- "%PYTHON%\\python.exe -m venv venv"
|
|
- venv\Scripts\activate.bat
|
|
- pip.exe install -r requirements.txt
|
|
- pip.exe install vcrpy
|
|
- pip.exe install jupyter
|
|
- pip.exe install ipywidgets
|
|
- pip.exe install stestr
|
|
- pip.exe install qiskit-aer
|
|
# TODO(mtreinish): uncomment this when testing-cabal/subunit#33 is fixed
|
|
# - pip.exe install junitxml
|
|
|
|
# Use py.test for output of xunit test results.
|
|
test_script:
|
|
- stestr run
|
|
- stestr last --subunit > test_results.subunit
|
|
# TODO(mtreinish): uncomment this when testing-cabal/subunit#33 is fixed
|
|
# - subunit2junitxml test_results.subunit > test_results.xml
|
|
|
|
# Upload the test results to appveyor so they are shown on the "Tests" tab.
|
|
on_finish:
|
|
- ps: $wc = New-Object 'System.Net.WebClient'
|
|
# TODO(mtreinish): uncomment this when testing-cabal/subunit#33 is fixed
|
|
# - ps: $wc.UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\test_results.xml))
|