11jobs :
2- - job :
2+ - job : BuildAndSign
3+ displayName : " Build and sign"
34 templateContext :
45 outputs :
56 - output : pipelineArtifact
@@ -24,10 +25,10 @@ jobs:
2425 inputs :
2526 artifactFeeds : " internal/PythonSDK_Internal_PublicPackages"
2627
27- # Install build + lint tooling
28+ # Install build + lint + test tooling
2829 - script : |
2930 python -m pip install --upgrade pip
30- python -m pip install build flake8
31+ python -m pip install build flake8 pytest pytest-asyncio aiohttp
3132 displayName: "Install build tooling"
3233
3334 # Lint core SDK
5556 ls -la $(Build.ArtifactStagingDirectory)/buildoutputs/durabletask
5657 ls -la $(Build.ArtifactStagingDirectory)/buildoutputs/durabletask-azuremanaged
5758 displayName: "List build outputs"
59+
60+ # Install the built wheels and run unit tests against them. We exclude
61+ # tests marked `dts` (require the Durable Task Scheduler emulator) and
62+ # `azurite` (require the Azurite blob emulator) since those external
63+ # services aren't provisioned in this network-isolated pool. The full
64+ # matrix (including emulator-backed tests) runs in GitHub Actions on
65+ # PRs to main and main itself; this step is defense-in-depth to ensure
66+ # the artifacts we're about to ship are at least importable and pass
67+ # the pure-Python unit tests.
68+ - script : |
69+ set -e
70+ python -m pip install $(Build.ArtifactStagingDirectory)/buildoutputs/durabletask/*.whl
71+ python -m pip install $(Build.ArtifactStagingDirectory)/buildoutputs/durabletask-azuremanaged/*.whl
72+ displayName: "Install built wheels"
73+
74+ - script : pytest -m "not dts and not azurite" --verbose
75+ displayName : " pytest: durabletask (unit tests, no emulators)"
76+ workingDirectory : tests/durabletask
77+
78+ - script : pytest -m "not dts" --verbose
79+ displayName : " pytest: durabletask-azuremanaged (unit tests, no emulators)"
80+ workingDirectory : tests/durabletask-azuremanaged
0 commit comments