diff options
author | David Lord <davidism@gmail.com> | 2020-01-26 10:13:50 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-26 10:13:50 -0800 |
commit | 8e2cdcc7a12cb11d0fedda8cfdb120f9e17c61e8 (patch) | |
tree | a31a524a9f75ca0854fd83a323e01d0b13879068 | |
parent | 4261f8489377555ba7ac71436f4ed7c7abb3d3a2 (diff) | |
parent | 7c3d08886520d6a19108577cb737839401cb61ed (diff) | |
download | markupsafe-8e2cdcc7a12cb11d0fedda8cfdb120f9e17c61e8.tar.gz |
Merge pull request #113 from davidism/azure-pipelines
Switch to Azure Pipelines
-rw-r--r-- | .appveyor.yml | 36 | ||||
-rw-r--r-- | .azure-pipelines.yml | 85 | ||||
-rw-r--r-- | .pre-commit-config.yaml | 10 | ||||
-rw-r--r-- | .travis.yml | 73 | ||||
-rw-r--r-- | MANIFEST.in | 4 | ||||
-rw-r--r-- | setup.cfg | 23 | ||||
-rw-r--r-- | setup.py | 5 | ||||
-rw-r--r-- | tox.ini | 38 |
8 files changed, 115 insertions, 159 deletions
diff --git a/.appveyor.yml b/.appveyor.yml deleted file mode 100644 index c576a9f..0000000 --- a/.appveyor.yml +++ /dev/null @@ -1,36 +0,0 @@ -environment: - global: - PYTHON: C:\Python37-x64 - CIBW_TEST_REQUIRES: pytest - CIBW_TEST_COMMAND: pytest {project}\tests - -init: - - set PATH=%PYTHON%\Scripts;%PYTHON%;%PATH% - -install: - - python -m pip install -U pip - - python -m pip install -U cibuildwheel - -build_script: - - python -m cibuildwheel --output-dir dist - -artifacts: - - path: dist\*.whl - -deploy: - provider: S3 - access_key_id: - secure: "KP/pEANcoiWbT6ie9cwmMseUN2Z/VZEmcN2kAlA8rdY=" - secret_access_key: - secure: "kaYMEi5krUfR1pKRyXbuL7Lkxwrv6T6qwfhl0bE0BPqKCSOU1REx23OYz97UtAGq" - bucket: pallets-wheels - region: us-east-1 - folder: markupsafe - -branches: - only: - - master - - /^\d+(\.\d+)*(\.x)?$/ - -cache: - - '%LOCALAPPDATA%\pip\Cache' diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml new file mode 100644 index 0000000..9e225b5 --- /dev/null +++ b/.azure-pipelines.yml @@ -0,0 +1,85 @@ +trigger: + branches: + include: + - master + - '*.x' + tags: + include: + - '*' + +jobs: + - job: Test + variables: + vmImage: 'ubuntu-latest' + python.version: '3.8' + TOXENV: 'py' + + strategy: + matrix: + Python 3.8 Linux: + vmImage: 'ubuntu-latest' + Python 3.8 Windows: + vmImage: 'windows-latest' + Python 3.8 Mac: + vmImage: 'macos-latest' + PyPy 3 Linux: + python.version: 'pypy3' + Python 3.7 Linux: + python.version: '3.7' + Python 3.6 Linux: + python.version: '3.6' + Python 3.5 Linux: + python.version: '3.5' + Python 2.7 Linux: + python.version: '2.7' + Docs: + TOXENV: 'docs' + Style: + TOXENV: 'style' + + pool: + vmImage: $[ variables.vmImage ] + + steps: + - task: UsePythonVersion@0 + inputs: + versionSpec: $(python.version) + displayName: Use Python $(python.version) + + - script: pip --disable-pip-version-check install -U tox + displayName: Install tox + + - script: tox + displayName: Run tox + + - job: Build + dependsOn: Test + condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/') + + strategy: + matrix: + Linux: + vmImage: 'ubuntu-latest' + Windows: + vmImage: 'windows-latest' + Mac: + vmImage: 'macos-latest' + + pool: + vmImage: $[ variables.vmImage ] + + steps: + - task: UsePythonVersion@0 + displayName: Use Python + + - script: choco install vcpython27 -f -y + displayName: Install Visual C++ for Python 2.7 + condition: eq(variables['vmImage'], 'windows-latest') + + - script: pip install cibuildwheel + displayName: Install cibuildwheel + + - script: cibuildwheel --output-dir wheels . + displayName: Run cibuildwheel + + - publish: 'wheels' diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6a86504..cdbcfed 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,20 +1,20 @@ repos: - repo: https://github.com/asottile/reorder_python_imports - rev: v1.3.5 + rev: v1.9.0 hooks: - id: reorder-python-imports args: ["--application-directories", "src"] - - repo: https://github.com/ambv/black - rev: 18.9b0 + - repo: https://github.com/python/black + rev: 19.10b0 hooks: - id: black - repo: https://gitlab.com/pycqa/flake8 - rev: 3.7.6 + rev: 3.7.9 hooks: - id: flake8 additional_dependencies: [flake8-bugbear] - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v2.1.0 + rev: v2.4.0 hooks: - id: check-byte-order-marker - id: trailing-whitespace diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index eac6fcf..0000000 --- a/.travis.yml +++ /dev/null @@ -1,73 +0,0 @@ -os: linux -dist: xenial -language: python -python: - - "3.7" - - "3.6" - - "3.5" - - "3.4" - - "2.7" - - "nightly" - - "pypy3.5-6.0" -env: TOXENV=py,codecov - -matrix: - include: - - env: TOXENV=stylecheck,docs-html - - stage: wheel - sudo: required - services: - - docker - install: - - pip install cibuildwheel - script: &wheel_script - - cibuildwheel --output-dir wheelhouse - deploy: &wheel_deploy - on: - all_branches: true - condition: $TRAVIS_BRANCH =~ ^(master|[0-9]+(.[0-9]+)*(.x)?)$ - skip_cleanup: true - provider: s3 - access_key_id: - secure: "zAF4qUM+MwCDt1NmMYDgHKldcQi+J2OdC/UCLfJLA/HRzIQoulIRKBcy6IEbf4IPaejwrhPtGG2LX9fIVBWsZs/3IyInf9ywSD88IdLPO0FUHcd6ebAsQSYuG2naVC9r0G6dDZzXT8vSf4Q2OxEsdsUg+NZtOmtv45jGlnuHc5Y=" - secret_access_key: - secure: "I6OUM83O0o/N8Zvxk3vI40JDjQKniSUPPyeY5H53I+DtuUfFl0JOYHXr+XKjhM/CCGT3A2lJwugE1YOXch7fc5QRxp30Dl61ASOY3QFRp2EGNPNTBi5l9NYChPSEC96t6LzZJTSqvRmC+STrpinPW03egNKPJbBU8OKYyEyJr+M=" - bucket: pallets-wheels - region: us-east-1 - local_dir: wheelhouse - upload-dir: markupsafe - - stage: wheel - os: osx - language: generic - install: - - pip2 install cibuildwheel - script: *wheel_script - deploy: *wheel_deploy - allow_failures: - - python: nightly - - python: pypy3.5-6.0 - fast_finish: true - -stages: - - test - - name: wheel - if: NOT type = pull_request - -install: - - pip install tox - -script: - - tox --skip-missing-interpreters=false - -cache: - directories: - - $HOME/.cache/pip - - $HOME/.cache/pre-commit - -branches: - only: - - master - - /^\d+(\.\d+)*(\.x)?$/ - -notifications: - email: false diff --git a/MANIFEST.in b/MANIFEST.in index 92a16da..cab5663 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,8 +1,6 @@ include CHANGES.rst -include LICENSE.rst -include README.rst include tox.ini graft docs prune docs/_build graft tests -global-exclude *.py[co] +global-exclude *.pyc @@ -1,13 +1,18 @@ [metadata] license_file = LICENSE.rst +long_description_content_type = text/x-rst [tool:pytest] testpaths = tests +filterwarnings = + error [coverage:run] -branch = True +branch = true +parallel = true source = markupsafe + tests [coverage:paths] source = @@ -22,11 +27,17 @@ source = # W = pycodestyle warnings # B9 = bugbear opinions select = B, E, F, W, B9 -# E203 = slice notation whitespace, invalid -# E501 = line length, handled by bugbear B950 -# W503 = bin op line break, invalid -ignore = E203, E501, W503 +ignore = + # slice notation whitespace, invalid + E203 + # line length, handled by bugbear B950 + E501 + # bare except, handled by bugbear B001 + E722 + # bin op line break, invalid + W503 # up to 88 allowed by bugbear B950 max-line-length = 80 # _compat names and imports will always look bad, ignore warnings -exclude = src/markupsafe/_compat.py +exclude = + src/markupsafe/_compat.py @@ -74,12 +74,7 @@ def run_setup(with_binary): "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Text Processing :: Markup :: HTML", @@ -1,44 +1,20 @@ [tox] envlist = - py{37,36,35,34,27,py3,py3,py} - stylecheck - docs-html - coverage-report + py{38,37,36,35,27,py3,py} + style + docs skip_missing_interpreters = true [testenv] -setenv = - COVERAGE_FILE = .coverage.{envname} deps = - pytest-cov -commands = pytest --tb=short --cov --cov-report= {posargs} + pytest +commands = pytest --tb=short --basetemp={envtmpdir} {posargs} -[testenv:stylecheck] +[testenv:style] deps = pre-commit skip_install = true commands = pre-commit run --all-files --show-diff-on-failure -[testenv:docs-html] +[testenv:docs] deps = -r docs/requirements.txt commands = sphinx-build -W -b html -d {envtmpdir}/doctrees docs {envtmpdir}/html - -[testenv:coverage-report] -setenv = - COVERAGE_FILE = .coverage -deps = coverage -skip_install = true -commands = - coverage combine - coverage html - coverage report - -[testenv:codecov] -passenv = CI TRAVIS TRAVIS_* -setenv = - COVERAGE_FILE = .coverage -deps = codecov -skip_install = true -commands = - coverage combine - codecov - coverage report |