forked from labd/django-session-timeout
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
56 lines (54 loc) · 1.59 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
jobs:
- job: UpdateBuildNumber
pool:
vmImage: ubuntu-16.04
steps:
- script: |
pip3 install --upgrade setuptools
echo "##vso[build.UpdateBuildNumber]`python3 setup.py --version`-$BUILD_BUILDID"
displayName: Set Version number
- job: Test
pool:
vmImage: "ubuntu-16.04"
strategy:
matrix:
python 3.6:
python.version: "3.6"
TOXENV: "py36"
python 3.7:
python.version: "3.7"
TOXENV: "py37"
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: "$(python.version)"
- script: |
python -m pip install --upgrade pip
pip3 install --upgrade setuptools
pip3 install --upgrade tox
pip3 install --upgrade codecov
displayName: "Install testing requirements"
- script: tox -e $(TOXENV)
displayName: "Run tox with TOXENV=$(TOXENV)"
- script: |
tox -e coverage-report
codecov
condition: succeeded()
displayName: "Upload coverage information to codecov.io"
- job: Publish
pool:
vmImage: "ubuntu-16.04"
dependsOn: Test
condition: in(variables['Build.SourceBranch'], 'refs/heads/master')
displayName: "Publish artifacts"
steps:
- task: CopyFiles@2
displayName: 'Copy Files to: $(Build.ArtifactStagingDirectory)'
inputs:
SourceFolder: '$(Build.SourcesDirectory)'
Contents: |
**/*
!.git/**/*
TargetFolder: '$(Build.ArtifactStagingDirectory)'
- task: PublishBuildArtifacts@1
displayName: drop