-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
azure-sdisttest.yml
73 lines (60 loc) · 1.68 KB
/
azure-sdisttest.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
jobs:
- job: testable_sdist
displayName: Ensure sdist is testable
variables:
pip_cache_dir: $(Pipeline.Workspace)/.pip
pool:
vmImage: 'Ubuntu-latest'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.11'
- task: Cache@2
inputs:
key: 'pip | "$(Agent.OS)" | requirements-dev.txt | requirements-flake8.txt'
restoreKeys: |
pip | "$(Agent.OS)"
path: $(pip_cache_dir)
displayName: Cache pip
- script: python -m pip install build
displayName: Install 'build' package
- script: |
python -m build -s
ls -lah dist
displayName: Build sdist
- script: |
mkdir sandbox
displayName: Create sandbox
- script: |
cp dist/*.gz sandbox/
cd sandbox
tar xvf *.gz
displayName: Unpack sdist in sandbox
- script: |
cd sandbox
python -m venv env
displayName: Create venv
# Only the dir of the unpacked sdist will have a digit in its name
- script: |
cd sandbox
echo $( find . -maxdepth 1 -type d -regex "./.+[0-9].+" )
displayName: Check unpack dir name
- script: |
cd sandbox
source env/bin/activate
cd $( find . -maxdepth 1 -type d -regex "./.+[0-9].+" )
python -m pip install -r requirements-dev.txt
displayName: Install dev req'ts to venv
- script: |
cd sandbox
source env/bin/activate
cd $( find . -maxdepth 1 -type d -regex "./.+[0-9].+" )
cd doc
O=-Ean make html
displayName: Build docs in sandbox
- script: |
cd sandbox
source env/bin/activate
cd $( find . -maxdepth 1 -type d -regex "./.+[0-9].+" )
pytest --nonloc
displayName: Run test suite in sandbox