From 5352805ebc1ae85dc1961fa69115b0e6b78c9978 Mon Sep 17 00:00:00 2001 From: James Tocknell Date: Thu, 31 Dec 2020 13:16:01 +1100 Subject: [PATCH] More to using azure pipelines --- .travis.yml | 56 ------------------------ MANIFEST.in | 5 ++- appveyor.yml | 44 ------------------- azure-pipelines.yml | 84 ++++++++++++++++++++++++++++++++++++ bors.toml | 6 ++- ci/azure-pipelines-steps.yml | 38 ++++++++++++++++ tox.ini | 3 +- 7 files changed, 131 insertions(+), 105 deletions(-) delete mode 100644 .travis.yml delete mode 100644 appveyor.yml create mode 100644 azure-pipelines.yml create mode 100644 ci/azure-pipelines-steps.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index c366ea7..0000000 --- a/.travis.yml +++ /dev/null @@ -1,56 +0,0 @@ -dist: xenial - -language: python - -branches: - except: - - staging.tmp - - trying.tmp - -cache: - directories: - - $HOME/.cache/pip - -matrix: - include: - - python: 3.7 - env: - - TOXENV=py37 - - python: 3.8 - env: - - TOXENV=py38 - - python: 3.7 - env: - - TOXENV=flake8 - - python: 3.7 - env: - - TOXENV=pylint - - python: 3.7 - env: - - TOXENV=docs - - python: 3.7 - env: - - TOXENV=check-manifest - - python: 3.7 - env: - - TOXENV=checkreadme - -before_install: - - pip install codecov # for coverage - -install: - - pip install tox - -script: - - tox - -after_success: - - codecov - -deploy: - provider: pypi - username: "__token__" - password: - secure: dK48C2Qk+2dRQE+OJVhGocRJH6PrFP2owW9VNJJVpZVCHU5dahoPGKDRh0TRy8pTBu7kyqjCKk6DJUMN5Tsaj5xY6V/fiDNNO3U5DDo2UfLk9V5H0ApYygf/ThL18CaQ5IejrMlJtB6xfNqfD1NO7kVQXAdpWS/g3BuzDI/lqpgn+bSGaHOXTpNVbl8fErH8m96QRZT6O0X9hIMWC9Z4TFv7vezJ1Yeuv+F4kQVdUUS7EoftGL44/teheSl1RU/vS22tOXB+VeR4lKJHWb9Lwn+BYouSnW/3YzHSSg9E2RIk4n2UpYnjfTO3jzbDTtVGOWSP0cW8O7dnX/KPPSaPvbemz9VtFu1YeL88BPOWI1WgbvEYjflrllWkOGbaYHRywyqTEBKebEAgI1yXg/HPeEV6ygNqHmlQRIdVkxoCdTHgyDUfTY+AXH2j0oEey4G4euGmds5OEUdwILiv2fioaq4bgGWUeM1ejXx1jYBPFY99uo/X+m375KHB1cal2vhSJZbkHiy+aP/soRxHdTZZwWhXVea0e1mzjddtT/SRVVBag/r0q+UsHXuLGXPXtwZi2Xk7rSBH3PT88E36ajbpYj8olyzZeqsj8WlAs7IkhXTrhO8MvQrZ4Fv+2j1FzzABtMeHRAKJgCm0sKYd/mUFiFy2q/T7FWG/sHIJU86L1EU= - on: - tags: true diff --git a/MANIFEST.in b/MANIFEST.in index 2e72c80..915987a 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -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 * diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index eaabf7e..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,44 +0,0 @@ -# from https://packaging.python.org/en/latest/appveyor/ -branches: - only: - # This is where pull requests from "bors r+" are built. - - staging - # This is where pull requests from "bors try" are built. - - trying - # Uncomment this to enable building pull requests. - - master -environment: - matrix: - - - PYTHON: "C:\\Python37" - TOXENV: "py37" - TOXPYTHON: "%PYTHON%\\python.exe" - - - PYTHON: "C:\\Python38" - TOXENV: "py38" - TOXPYTHON: "%PYTHON%\\python.exe" - - - PYTHON: "C:\\Python37-x64" - TOXENV: "py37" - TOXPYTHON: "%PYTHON%\\python.exe" - - - PYTHON: "C:\\Python38-x64" - TOXENV: "py38" - TOXPYTHON: "%PYTHON%\\python.exe" - -install: - # We need wheel installed to build wheels - - "%PYTHON%\\python.exe -m pip install --upgrade wheel pip setuptools" - - "py -3.7 -m pip install --upgrade wheel pip setuptools" - - "py -3.7 -m pip install tox codecov" - -build: off - -test_script: - - "py -3.7 -m tox" - -cache: - - "%LOCALAPPDATA%\\pip\\Cache" - -on_success: - - "py -3.7 -m codecov" diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000..3dcc3ca --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,84 @@ +# 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,doctest,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 diff --git a/bors.toml b/bors.toml index 5584471..0191b65 100644 --- a/bors.toml +++ b/bors.toml @@ -1,6 +1,8 @@ status = [ - "continuous-integration/travis-ci/push", - #"continuous-integration/appveyor/branch", +# "continuous-integration/travis-ci/push", +# "continuous-integration/appveyor/branch", + "stringtopy.stringtopy", "codecov/patch", "codecov/project", ] + diff --git a/ci/azure-pipelines-steps.yml b/ci/azure-pipelines-steps.yml new file mode 100644 index 0000000..831c65d --- /dev/null +++ b/ci/azure-pipelines-steps.yml @@ -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/') diff --git a/tox.ini b/tox.ini index b9fbabd..75ec174 100644 --- a/tox.ini +++ b/tox.ini @@ -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}