Skip to content

Commit

Permalink
Travis sucks; switch to Azure Pipelines
Browse files Browse the repository at this point in the history
HTML is autogenerated by Azure
  • Loading branch information
Neil Booth committed Feb 3, 2021
1 parent 5b4bd79 commit 56c7ba4
Show file tree
Hide file tree
Showing 4 changed files with 92 additions and 22 deletions.
35 changes: 35 additions & 0 deletions .azure-pipelines/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
pr:
- master
- releases/*

jobs:
- template: run-tests.yml
parameters:
name: Py38_Ubuntu
vmImage: 'ubuntu-16.04'
pythonVersion: '3.8'
- template: run-tests.yml
parameters:
name: Py38_Mac
vmImage: 'macOS-10.14'
pythonVersion: '3.8'
- template: run-tests.yml
parameters:
name: Py38_Win
vmImage: 'windows-2019'
pythonVersion: '3.8'
- template: run-tests.yml
parameters:
name: Py39_Ubuntu
vmImage: 'ubuntu-16.04'
pythonVersion: '3.9'
- template: run-tests.yml
parameters:
name: Py39_Mac
vmImage: 'macOS-10.14'
pythonVersion: '3.9'
- template: run-tests.yml
parameters:
name: Py39_Win
vmImage: 'windows-2019'
pythonVersion: '3.9'
21 changes: 21 additions & 0 deletions .azure-pipelines/prepare-env.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
parameters:
onlyPullRequests: false

steps:
- script: |
python -m pip install websockets uvloop
python -m pip install pycodestyle
python -m pip install coveralls coverage
python -m pip install pytest pytest-asyncio Sphinx
displayName: Prepare general environment
condition: |
and(
succeeded(),
or(
eq(variables['Build.Reason'], 'PullRequest'),
eq(${{ parameters.onlyPullRequests }}, false)
)
)
enabled: true
continueOnError: false
failOnStderr: false
36 changes: 36 additions & 0 deletions .azure-pipelines/run-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
parameters:
name: '' # defaults for any parameters that aren't specified
vmImage: ''
pythonVersion: ''

jobs:
- job: ${{ parameters.name }}
pool:
vmImage: ${{ parameters.vmImage }}
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: ${{ parameters.pythonVersion }}
addToPath: true
architecture: x64
- template: prepare-env.yml
- script: |
coverage run -m pytest --junitxml=junit/test-results.xml tests
coverage xml
displayName: 'Test with pytest'
- task: PublishTestResults@2
condition: succeededOrFailed()
inputs:
testResultsFiles: 'junit/test-*.xml'
testRunTitle: 'Publish test results for Python ${{ parameters.pythonVersion }}'
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: cobertura
summaryFileLocation: coverage.xml
- bash: |
COVERALLS_REPO_TOKEN=$(COVERALLS_REPO_TOKEN) coveralls
displayName: 'Coveralls'
- bash: |
pycodestyle --max-line-length=100 aiorpcx/*.py
condition: succeededOrFailed()
displayName: 'Validate code style'
22 changes: 0 additions & 22 deletions .travis.yml

This file was deleted.

0 comments on commit 56c7ba4

Please sign in to comment.