Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- corrects two bugs happening in Windows - modifies the build pipeline to build and run tests on Windows
- Loading branch information
1 parent
4b31b1a
commit 81077e6
Showing
18 changed files
with
156 additions
and
94 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
* text=auto eol=lf |
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
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
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,52 +1,99 @@ | ||
# BlackSheep build pipeline | ||
|
||
trigger: | ||
- master | ||
|
||
pool: | ||
vmImage: 'ubuntu-latest' | ||
strategy: | ||
matrix: | ||
Python37: | ||
python.version: '3.7' | ||
Python38: | ||
python.version: '3.8' | ||
|
||
steps: | ||
- task: UsePythonVersion@0 | ||
inputs: | ||
versionSpec: '$(python.version)' | ||
displayName: 'Use Python $(python.version)' | ||
|
||
- bash: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
pip install pytest pytest-cov pytest-azurepipelines | ||
displayName: 'Install dependencies' | ||
|
||
- bash: | | ||
make compile | ||
displayName: 'Compile Cython extensions' | ||
|
||
- bash: | | ||
pytest --doctest-modules --junitxml=junit/test-results.xml --cov-report html --cov=blacksheep | ||
displayName: 'tests' | ||
|
||
- bash: | | ||
if [ -f "build_info.txt" ]; then rm build_info.txt; fi | ||
echo "Build id: $(Build.BuildId)" >> build_info.txt | ||
echo "Build date: $(date)" >> build_info.txt | ||
echo "Build URL: https://dev.azure.com/robertoprevato/BlackSheep/_build/results?buildId=$(Build.BuildId)&view=results" >> build_info.txt | ||
echo "Build version: $(Build.DefinitionVersion)" >> build_info.txt | ||
displayName: 'writes build id' | ||
|
||
- bash: | | ||
python setup.py sdist | ||
displayName: 'create artifacts' | ||
|
||
- task: PublishBuildArtifacts@1 | ||
displayName: 'publish dist artifacts' | ||
condition: and(succeeded(), eq(variables['python.version'], '3.8')) | ||
inputs: | ||
PathtoPublish: dist | ||
ArtifactName: dist | ||
- master | ||
|
||
jobs: | ||
- job: Linux | ||
pool: | ||
vmImage: "ubuntu-latest" | ||
strategy: | ||
matrix: | ||
Python37: | ||
python.version: "3.7" | ||
Python38: | ||
python.version: "3.8" | ||
steps: | ||
- task: UsePythonVersion@0 | ||
inputs: | ||
versionSpec: "$(python.version)" | ||
displayName: "Use Python $(python.version)" | ||
|
||
- bash: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
pip install uvloop==0.14.0 | ||
pip install pytest pytest-cov pytest-azurepipelines | ||
displayName: "Install dependencies" | ||
- bash: | | ||
make compile | ||
displayName: "Compile Cython extensions" | ||
- bash: | | ||
pytest --doctest-modules --junitxml=junit/test-results.xml --cov-report html --cov=blacksheep | ||
displayName: "tests" | ||
- script: | | ||
flake8 blacksheep | ||
flake8 tests | ||
displayName: "flake8 tests" | ||
- bash: | | ||
if [ -f "build_info.txt" ]; then rm build_info.txt; fi | ||
echo "Build id: $(Build.BuildId)" >> build_info.txt | ||
echo "Build date: $(date)" >> build_info.txt | ||
echo "Build URL: https://dev.azure.com/robertoprevato/BlackSheep/_build/results?buildId=$(Build.BuildId)&view=results" >> build_info.txt | ||
echo "Build version: $(Build.DefinitionVersion)" >> build_info.txt | ||
displayName: "writes build id" | ||
- bash: | | ||
python setup.py sdist | ||
displayName: "create artifacts" | ||
- task: PublishBuildArtifacts@1 | ||
displayName: "publish dist artifacts" | ||
condition: and(succeeded(), eq(variables['python.version'], '3.8')) | ||
inputs: | ||
PathtoPublish: dist | ||
ArtifactName: dist | ||
- job: Windows | ||
pool: | ||
vmImage: "windows-latest" | ||
strategy: | ||
matrix: | ||
Python37: | ||
python.version: "3.7" | ||
Python38: | ||
python.version: "3.8" | ||
steps: | ||
- task: UsePythonVersion@0 | ||
inputs: | ||
versionSpec: "$(python.version)" | ||
displayName: "Use Python $(python.version)" | ||
|
||
- script: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
pip install pytest pytest-azurepipelines | ||
displayName: "Install dependencies" | ||
- script: | | ||
cython blacksheep/url.pyx | ||
cython blacksheep/exceptions.pyx | ||
cython blacksheep/headers.pyx | ||
cython blacksheep/cookies.pyx | ||
cython blacksheep/contents.pyx | ||
cython blacksheep/messages.pyx | ||
cython blacksheep/scribe.pyx | ||
cython blacksheep/baseapp.pyx | ||
python setup.py build_ext --inplace | ||
displayName: "Compile Cython extensions" | ||
- script: | | ||
flake8 blacksheep | ||
flake8 tests | ||
displayName: "flake8 tests" | ||
- script: | | ||
pytest --doctest-modules --junitxml=junit/test-results.xml | ||
displayName: "tests" |
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
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
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
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
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
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
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
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
This file was deleted.
Oops, something went wrong.
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
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
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
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
Oops, something went wrong.