appveyor.yml 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. # Do not build feature branch with open Pull Requests
  2. skip_branch_with_pr: true
  3. # environment variables
  4. environment:
  5. nodejs_version: "6.9"
  6. matrix:
  7. - PYTHON: "C:\\Python35-x64"
  8. PYTHON_VERSION: "3.5.x"
  9. PYTHON_MAJOR: 3
  10. PYTHON_ARCH: "64"
  11. # build cache to preserve files/folders between builds
  12. cache:
  13. - node_modules # NPM packages
  14. # scripts that run after cloning repository
  15. install:
  16. # If there is a newer build queued for the same PR, cancel this one.
  17. # The AppVeyor 'rollout builds' option is supposed to serve the same
  18. # purpose but it is problematic because it tends to cancel builds pushed
  19. # directly to master instead of just PR builds (or the converse).
  20. # credits: JuliaLang developers.
  21. - ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod `
  22. https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | `
  23. Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { `
  24. throw "There are newer queued builds for this pull request, failing early." }
  25. # Install node:
  26. - ps: Install-Product node $env:nodejs_version
  27. # Install newer Firefox
  28. - choco install firefox
  29. # Make sure our packages are up to date.
  30. - npm update
  31. # Ensure python and python scripts are from right version:
  32. - 'SET "PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"'
  33. # Install our package:
  34. - 'pip install --upgrade -e ".[test]"'
  35. build: off
  36. # to run your custom scripts instead of automatic tests
  37. test_script:
  38. - 'py.test'
  39. - 'npm test'