forked from Azure/azure-sdk-for-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PR validation pipelines for Python repo. (Azure#5234)
* Initial layout for PR validation pipelines. * Fixing path filter, and clearing some whitespace. * Added ci file for service bus. * moved ci.yml file for servicebus. * Fixed up trigger path. * Fixed up template relative path. * Trying a different targetting string. * Target string fix and enabling coverage collection under /sdk.
- Loading branch information
1 parent
bb11635
commit b6f93ba
Showing
5 changed files
with
277 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
[run] | ||
include = | ||
azure* | ||
sdk* | ||
omit = | ||
*/test* | ||
env* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# DO NOT EDIT THIS FILE | ||
# This file is generated automatically and any changes will be lost. | ||
|
||
trigger: none | ||
|
||
pr: | ||
branches: | ||
include: | ||
- master | ||
paths: | ||
include: | ||
- azure-applicationinsights | ||
|
||
variables: | ||
build_targeting_string: azure-applicationinsights | ||
|
||
jobs: | ||
- template: ../eng/pipelines/templates/jobs/archetype-sdk-client.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,238 @@ | ||
jobs: | ||
- job: 'Build' | ||
variables: | ||
- template: ../variables/globals.yml | ||
condition: or(eq(variables['long_running_tests'], False), eq(variables['long_running_tests'], '')) | ||
|
||
pool: | ||
vmImage: 'ubuntu-16.04' | ||
|
||
steps: | ||
- task: UsePythonVersion@0 | ||
displayName: 'Use Python $(PythonVersion)' | ||
inputs: | ||
versionSpec: $(PythonVersion) | ||
|
||
- script: | | ||
pip install wheel setuptools pathlib twine readme-renderer[md] | ||
displayName: 'Prep Environment' | ||
- task: PythonScript@0 | ||
displayName: 'Generate Packages' | ||
inputs: | ||
scriptPath: 'scripts/devops_tasks/build_packages.py' | ||
arguments: '-d "$(Build.ArtifactStagingDirectory)" "$(build_targeting_string)"' | ||
|
||
- script: | | ||
twine check $(Build.ArtifactStagingDirectory)/* | ||
displayName: 'Verify Readme' | ||
- task: PublishBuildArtifacts@1 | ||
condition: succeededOrFailed() | ||
displayName: 'Publish Artifacts' | ||
inputs: | ||
artifactName: packages | ||
|
||
- job: 'Analyze' | ||
variables: | ||
- template: ../variables/globals.yml | ||
condition: or(eq(variables['long_running_tests'], False), eq(variables['long_running_tests'], '')) | ||
|
||
dependsOn: | ||
- 'Build' | ||
|
||
pool: | ||
vmImage: 'ubuntu-16.04' | ||
|
||
steps: | ||
- task: UsePythonVersion@0 | ||
displayName: 'Use Python $(PythonVersion)' | ||
inputs: | ||
versionSpec: '$(PythonVersion)' | ||
|
||
- script: | | ||
pip install setuptools wheel Jinja2 | ||
pip install doc-warden | ||
ward scan -d $(Build.SourcesDirectory) -c $(Build.SourcesDirectory)/.docsettings.yml | ||
displayName: 'Verify Readmes' | ||
- task: PythonScript@0 | ||
displayName: 'Analyze dependencies' | ||
inputs: | ||
scriptPath: 'scripts/analyze_deps.py' | ||
arguments: '--verbose --out "$(Build.ArtifactStagingDirectory)/dependencies.html"' | ||
|
||
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0 | ||
# ComponentGovernance is currently unable to run on pull requests of public projects. Running on non-PR | ||
# builds should be sufficient. | ||
condition: and(succeededOrFailed(), ne(variables['Build.Reason'],'PullRequest')) | ||
displayName: 'Component Detection' | ||
|
||
- task: PublishBuildArtifacts@1 | ||
condition: succeededOrFailed() | ||
displayName: 'Publish Report Artifacts' | ||
inputs: | ||
artifactName: reports | ||
|
||
- job: 'Generic_Tests' | ||
variables: | ||
- template: ../variables/globals.yml | ||
|
||
condition: or(eq(variables['long_running_tests'], False), eq(variables['long_running_tests'], '')) | ||
|
||
dependsOn: | ||
- 'Build' | ||
|
||
strategy: | ||
matrix: | ||
Linux_Python27: | ||
OSName: 'Linux' | ||
OSVmImage: 'ubuntu-16.04' | ||
PythonVersion: '2.7' | ||
Linux_Python34: | ||
OSName: 'Linux' | ||
OSVmImage: 'ubuntu-16.04' | ||
PythonVersion: '3.4' | ||
Linux_Python35: | ||
OSName: 'Linux' | ||
OSVmImage: 'ubuntu-16.04' | ||
PythonVersion: '3.5' | ||
Linux_Python36: | ||
OSName: 'Linux' | ||
OSVmImage: 'ubuntu-16.04' | ||
PythonVersion: '3.6' | ||
Linux_Python37: | ||
OSName: 'Linux' | ||
OSVmImage: 'ubuntu-16.04' | ||
PythonVersion: '3.7' | ||
Windows_Python35: | ||
OSName: 'Windows' | ||
OSVmImage: 'vs2017-win2016' | ||
PythonVersion: '3.5' | ||
MacOS_Python27: | ||
OSName: 'MacOS' | ||
OSVmImage: 'macOS-10.13' | ||
PythonVersion: '2.7' | ||
|
||
pool: | ||
vmImage: '$(OSVmImage)' | ||
|
||
steps: | ||
- powershell: | | ||
Invoke-WebRequest -Uri "https://github.com/Azure/azure-sdk-tools/releases/download/sdk-tools_14793/sdk-tools.zip" ` | ||
-OutFile "sdk-tools.zip" | Wait-Process; Expand-Archive -Path "sdk-tools.zip" -DestinationPath "./sdk-tools/" | ||
workingDirectory: '$(Build.BinariesDirectory)' | ||
displayName: 'Download Tools Archive From Github Release and Extract it' | ||
- task: UsePythonVersion@0 | ||
displayName: 'Use Python $(PythonVersion)' | ||
inputs: | ||
versionSpec: '$(PythonVersion)' | ||
|
||
- task: PythonScript@0 | ||
displayName: 'Run VerifyAgentOS script' | ||
inputs: | ||
scriptPath: '$(Build.BinariesDirectory)/sdk-tools/scripts/python/verify_agent_os.py' | ||
arguments: $(OSName) | ||
|
||
- script: | | ||
pip install pathlib twine codecov beautifulsoup4 | ||
displayName: 'Prep Environment' | ||
- task: PythonScript@0 | ||
displayName: 'Setup and Run Tests' | ||
inputs: | ||
scriptPath: 'scripts/devops_tasks/setup_execute_tests.py' | ||
arguments: '"$(build_targeting_string)" --junitxml="junit/test-results.xml"' | ||
|
||
- task: PublishTestResults@2 | ||
condition: succeededOrFailed() | ||
inputs: | ||
testResultsFiles: 'junit/test-results.xml' | ||
testRunTitle: '$(OSName) Python $(PythonVersion)' | ||
|
||
- script: | | ||
coverage xml | ||
displayName: 'Generate Coverage XML' | ||
- script: | | ||
codecov -t $(codecov-python-repository-token) | ||
displayName: 'Publish Code Cov' | ||
condition: ne(variables['codecov-python-repository-token'], '') | ||
- task: PublishCodeCoverageResults@1 | ||
displayName: 'Publish Code Coverage to DevOps' | ||
inputs: | ||
codeCoverageTool: Cobertura | ||
summaryFileLocation: '$(Build.SourcesDirectory)/coverage.xml' | ||
|
||
- job: Test_Alpha_Python | ||
variables: | ||
- template: ../variables/globals.yml | ||
|
||
timeoutInMinutes: 90 | ||
|
||
condition: or(eq(variables['long_running_tests'], True), eq(variables['long_running_tests'], '')) | ||
|
||
dependsOn: | ||
- 'Build' | ||
|
||
pool: | ||
vmImage: 'ubuntu-16.04' | ||
|
||
steps: | ||
- task: UsePythonVersion@0 | ||
displayName: 'Use Python 3.7 For Build Tools' | ||
inputs: | ||
versionSpec: '3.7' | ||
|
||
- script: | | ||
sudo apt-get install build-essential libsqlite3-dev sqlite3 bzip2 libbz2-dev zlib1g-dev libssl-dev openssl libgdbm-dev liblzma-dev libreadline-dev libncursesw5-dev libffi-dev uuid-dev | ||
cd ~/ | ||
git clone https://github.com/python/cpython.git | ||
cd cpython | ||
mkdir debug | ||
cd debug | ||
../configure --enable-optimizations --prefix=$HOME | ||
make install | ||
cd $(Build.SourcesDirectory) | ||
PATH=/home/vsts/bin:$PATH | ||
python3 -m ensurepip | ||
python ./scripts/devops_tasks/setup_execute_tests.py -p python3 "$(build_targeting_string)" | ||
displayName: 'Setup - Run Filtered Tests "Nightly" Python' | ||
continueOnError: true | ||
- job: Test_PyPy | ||
variables: | ||
- template: ../variables/globals.yml | ||
|
||
timeoutInMinutes: 90 | ||
|
||
condition: or(eq(variables['long_running_tests'], True), eq(variables['long_running_tests'], '')) | ||
|
||
dependsOn: | ||
- 'Test_Alpha_Python' | ||
|
||
pool: | ||
vmImage: 'ubuntu-16.04' | ||
|
||
steps: | ||
- task: UsePythonVersion@0 | ||
displayName: 'Use Python 3.7 For Build Tools' | ||
inputs: | ||
versionSpec: '3.7' | ||
|
||
- script: | | ||
pip install pathlib twine | ||
displayName: 'Prep Environment' | ||
- script: | | ||
cd ~/ | ||
wget https://bitbucket.org/pypy/pypy/downloads/pypy3-v6.0.0-linux64.tar.bz2 | ||
tar xf pypy3-v6.0.0-linux64.tar.bz2 | ||
cd $(Build.SourcesDirectory) | ||
PATH=/home/vsts/pypy3-v6.0.0-linux64/bin/:$PATH | ||
pypy3 -m ensurepip | ||
python ./scripts/devops_tasks/setup_execute_tests.py -p pypy3 "$(build_targeting_string)" --disablecov | ||
displayName: 'Setup and Run Filtered Tests PyPy3' | ||
continueOnError: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
variables: | ||
PythonVersion: '3.6' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# DO NOT EDIT THIS FILE | ||
# This file is generated automatically and any changes will be lost. | ||
|
||
trigger: none | ||
|
||
pr: | ||
branches: | ||
include: | ||
- master | ||
paths: | ||
include: | ||
- sdk/servicebus/ | ||
|
||
variables: | ||
build_targeting_string: 'azure-servicebus' | ||
|
||
jobs: | ||
- template: ../../eng/pipelines/templates/jobs/archetype-sdk-client.yml |