Skip to content

Commit

Permalink
Merge #42
Browse files Browse the repository at this point in the history
42: More to using azure pipelines r=aragilar a=aragilar



Co-authored-by: James Tocknell <aragilar@gmail.com>
Co-authored-by: Restyled.io <commits@restyled.io>
Co-authored-by: bors[bot] <26634292+bors[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Dec 31, 2020
2 parents 9327f66 + b113614 commit 495ac30
Show file tree
Hide file tree
Showing 7 changed files with 127 additions and 106 deletions.
56 changes: 0 additions & 56 deletions .travis.yml

This file was deleted.

5 changes: 3 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ recursive-include tests *.py
include pylintrc
include tox.ini
include pypi-intro.rst
include appveyor.yml
include bors.toml
include pylint-requirements.txt
exclude .deepsource.toml
exclude bors.toml
exclude azure-pipelines.yml
recursive-exclude ci *
44 changes: 0 additions & 44 deletions appveyor.yml

This file was deleted.

80 changes: 80 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# from matplotlib's azure setup

schedules:
- cron: "0 0 * * 4"
displayName: Weekly build
branches:
include:
- releases/*
always: true

trigger:
tags:
include:
- "*"
branches:
include:
- "*"

variables:
PIP_CACHE_DIR: $(Pipeline.Workspace)/cache/pip

jobs:
- job: "static_checks"
pool:
vmImage: ubuntu-16.04
variables:
TOXENV: flake8,pylint,docs,check-manifest,checkreadme
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: "3.8"
architecture: "x64"
- script: |
pip install tox
displayName: Install tox
- script: |
tox
displayName: tox
- job: "ubuntu1604"
pool:
vmImage: ubuntu-16.04
strategy:
matrix:
py37:
python.version: "3.7"
TOXENV: py37
py38:
python.version: "3.8"
TOXENV: py38
py39:
python.version: "3.9"
TOXENV: py39
maxParallel: 4

steps:
- template: ci/azure-pipelines-steps.yml
parameters:
platform: linux

- job: "macOS1015"
pool:
vmImage: macOS-10.15
strategy:
matrix:
py37:
python.version: "3.7"
TOXENV: py37
py38:
python.version: "3.8"
TOXENV: py38
py39:
python.version: "3.9"
TOXENV: py39
maxParallel: 4

steps:
- template: ci/azure-pipelines-steps.yml
parameters:
platform: macos
5 changes: 3 additions & 2 deletions bors.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
status = [
"continuous-integration/travis-ci/push",
#"continuous-integration/appveyor/branch",
# "continuous-integration/travis-ci/push",
# "continuous-integration/appveyor/branch",
"aragilar.stringtopy",
"codecov/patch",
"codecov/project",
]
38 changes: 38 additions & 0 deletions ci/azure-pipelines-steps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: "$(python.version)"
architecture: "x64"
displayName: "Use Python $(python.version)"
condition: and(succeeded(), ne(variables['python.version'], 'Pre'))

- script: |
python -m pip install --upgrade pip
pip install tox codecov twine wheel
displayName: "Install pip dependencies"
- task: TwineAuthenticate@0
inputs:
externalFeeds: "pypi"
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/')

- script: env
displayName: "print env"

- script: |
tox
displayName: "tox"
#- script: |
# codecov
# displayName: 'codecov'
# hopefully the bash uploader will work
- script: |
bash <(curl -s https://codecov.io/bash)
displayName: "Upload to codecov.io"
- script: |
python setup.py sdist bdist_wheel
twine upload --skip-existing -r pypi --config-file $(PYPIRC_PATH) dist/*
displayName: "Upload to PyPI"
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/')
5 changes: 3 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
# and then run "tox" from this directory.

[tox]
envlist = py37,py38,flake8,pylint,docs,check-manifest,checkreadme
envlist = py37,py38,py39,flake8,pylint,docs,check-manifest,checkreadme

[testenv]
commands = py.test --cov={envsitepackagesdir}/stringtopy -s {posargs}
basepython =
py37: {env:TOXPYTHON:python3.7}
py38: {env:TOXPYTHON:python3.8}
py39: {env:TOXPYTHON:python3.9}
flake8: {env:TOXPYTHON:python3}
pylint: {env:TOXPYTHON:python3}
docs: {env:TOXPYTHON:python3}
Expand Down Expand Up @@ -38,7 +39,7 @@ commands=

[testenv:check-manifest]
deps=check-manifest
setenv =
setenv =
CHECK_MANIFEST=true
commands=
check-manifest
Expand Down

0 comments on commit 495ac30

Please sign in to comment.