mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-05-02 23:13:40 +03:00
Add Azure Pipelines config from another project
This commit is contained in:
parent
d167f9e0bd
commit
ac14c9d987
30
.azure-pipelines/jobs/lint.yml
Normal file
30
.azure-pipelines/jobs/lint.yml
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
parameters:
|
||||||
|
name: '' # defaults for any parameters that aren't specified
|
||||||
|
vmImage: ''
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
- job: ${{ parameters.name }}
|
||||||
|
pool:
|
||||||
|
vmImage: ${{ parameters.vmImage }}
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
Python37:
|
||||||
|
python.version: '3.7'
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- task: UsePythonVersion@0
|
||||||
|
inputs:
|
||||||
|
versionSpec: '$(python.version)'
|
||||||
|
architecture: 'x64'
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
python -m pip install --upgrade black flake8
|
||||||
|
displayName: 'Install dependencies'
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
flake8 --statistics --count
|
||||||
|
black --check --diff .
|
||||||
|
displayName: 'Static analysis'
|
49
.azure-pipelines/jobs/test.yml
Normal file
49
.azure-pipelines/jobs/test.yml
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
parameters:
|
||||||
|
name: '' # defaults for any parameters that aren't specified
|
||||||
|
vmImage: ''
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
- job: ${{ parameters.name }}
|
||||||
|
pool:
|
||||||
|
vmImage: ${{ parameters.vmImage }}
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
Python36:
|
||||||
|
python.version: '3.6'
|
||||||
|
Python37:
|
||||||
|
python.version: '3.7'
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- task: UsePythonVersion@0
|
||||||
|
inputs:
|
||||||
|
versionSpec: '$(python.version)'
|
||||||
|
architecture: 'x64'
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
python -m pip install --upgrade freezegun pytest pytest-cov requests_mock
|
||||||
|
python -m pip install -e .
|
||||||
|
displayName: 'Install dependencies'
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
pytest --cov pypistats --junitxml=junit/test-results.xml
|
||||||
|
displayName: 'Unit tests'
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
pypistats --help
|
||||||
|
pypistats recent --help
|
||||||
|
displayName: 'Test runs'
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
python -m pip install --upgrade codecov
|
||||||
|
codecov --name "Python $(python.version)" --build $(Build.BuildNumber)
|
||||||
|
condition: succeeded()
|
||||||
|
displayName: 'Upload to Codecov'
|
||||||
|
|
||||||
|
- task: PublishTestResults@2
|
||||||
|
inputs:
|
||||||
|
testResultsFiles: '**/test-results.xml'
|
||||||
|
testRunTitle: 'Python $(python.version)'
|
||||||
|
condition: succeededOrFailed()
|
48
azure-pipelines.yml
Normal file
48
azure-pipelines.yml
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
# Python package
|
||||||
|
# Create and test a Python package on multiple Python versions.
|
||||||
|
# Add steps that analyze code, save the dist with the build record,
|
||||||
|
# publish to a PyPI-compatible index, and more:
|
||||||
|
# https://docs.microsoft.com/azure/devops/pipelines/languages/python
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
- template: .azure-pipelines/jobs/lint.yml
|
||||||
|
parameters:
|
||||||
|
name: Lint
|
||||||
|
vmImage: 'Ubuntu-16.04'
|
||||||
|
|
||||||
|
- template: .azure-pipelines/jobs/test.yml
|
||||||
|
parameters:
|
||||||
|
name: Linux
|
||||||
|
vmImage: 'Ubuntu-16.04'
|
||||||
|
|
||||||
|
- template: .azure-pipelines/jobs/test.yml
|
||||||
|
parameters:
|
||||||
|
name: macOS
|
||||||
|
vmImage: 'xcode9-macos10.13'
|
||||||
|
|
||||||
|
- template: .azure-pipelines/jobs/test.yml
|
||||||
|
parameters:
|
||||||
|
name: Windows
|
||||||
|
vmImage: 'vs2017-win2016'
|
||||||
|
|
||||||
|
- job: Publish
|
||||||
|
dependsOn:
|
||||||
|
- Lint
|
||||||
|
- Linux
|
||||||
|
- macOS
|
||||||
|
- Windows
|
||||||
|
pool:
|
||||||
|
vmImage: 'Ubuntu-16.04'
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- task: UsePythonVersion@0
|
||||||
|
inputs:
|
||||||
|
versionSpec: '3.x'
|
||||||
|
architecture: 'x64'
|
||||||
|
|
||||||
|
- script: python setup.py sdist
|
||||||
|
displayName: 'Build sdist'
|
Loading…
Reference in New Issue
Block a user