49 lines
1.3 KiB
YAML
49 lines
1.3 KiB
YAML
trigger:
|
|
branches:
|
|
include: [master, test-me-*]
|
|
tags:
|
|
include: ['*']
|
|
|
|
resources:
|
|
repositories:
|
|
- repository: asottile
|
|
type: github
|
|
endpoint: github
|
|
name: asottile/azure-pipeline-templates
|
|
ref: refs/tags/v0.0.16
|
|
|
|
jobs:
|
|
- template: job--pre-commit.yml@asottile
|
|
# TODO: use templates: https://github.com/microsoft/azure-pipelines-image-generation/issues/1207
|
|
- job: tox_linux
|
|
pool:
|
|
vmImage: ubuntu-16.04
|
|
strategy:
|
|
matrix:
|
|
py36:
|
|
TOXENV: py36
|
|
python: python3.6
|
|
py37:
|
|
TOXENV: py37
|
|
python: python3.7
|
|
steps:
|
|
- bash: |
|
|
sudo add-apt-repository ppa:deadsnakes
|
|
sudo apt-get update
|
|
sudo apt-get install -y --no-install-recommends $(python)
|
|
displayName: install deadsnakes python
|
|
- bash: |
|
|
curl https://asottile.github.io/get-virtualenv.py | $(python) - /tmp/venv
|
|
/tmp/venv/bin/pip install tox
|
|
echo '##vso[task.prependpath]/tmp/venv/bin'
|
|
displayName: install tox
|
|
- script: tox
|
|
displayName: run tox
|
|
- bash: .tox/$(TOXENV)/bin/coverage xml -o coverage.xml
|
|
displayName: generate coverage xml
|
|
- task: PublishCodeCoverageResults@1
|
|
inputs:
|
|
codeCoverageTool: cobertura
|
|
summaryFileLocation: coverage.xml
|
|
displayName: publish coverage artifact
|