mirror of
https://github.com/kevin1024/vcrpy.git
synced 2025-12-09 01:03:24 +00:00
Move from travis to github actions
This commit is contained in:
committed by
Kevin McCarthy
parent
e68aa84649
commit
c596a160b3
11
.github/dependabot.yml
vendored
Normal file
11
.github/dependabot.yml
vendored
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
version: 2
|
||||||
|
|
||||||
|
updates:
|
||||||
|
- package-ecosystem: pip
|
||||||
|
directory: "/"
|
||||||
|
schedule:
|
||||||
|
interval: weekly
|
||||||
|
- package-ecosystem: "github-actions"
|
||||||
|
directory: "/"
|
||||||
|
schedule:
|
||||||
|
interval: weekly
|
||||||
40
.github/workflows/main.yml
vendored
Normal file
40
.github/workflows/main.yml
vendored
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
name: Test
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- "*"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
continue-on-error: true
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "pypy3"]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Install libgnutls28-dev
|
||||||
|
run: |
|
||||||
|
sudo apt update -q
|
||||||
|
sudo apt install -q -y libgnutls28-dev libcurl4-gnutls-dev
|
||||||
|
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
|
||||||
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: ${{ matrix.python-version }}
|
||||||
|
|
||||||
|
- name: Install project dependencies
|
||||||
|
run: |
|
||||||
|
python -m pip install -U pip codecov tox tox-gh-actions
|
||||||
|
|
||||||
|
- name: Run tests with tox
|
||||||
|
run: tox
|
||||||
|
|
||||||
|
- name: Run coverage
|
||||||
|
run: codecov
|
||||||
25
.travis.yml
25
.travis.yml
@@ -1,25 +0,0 @@
|
|||||||
dist: xenial
|
|
||||||
language: python
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
# Only run lint on a single 3.x
|
|
||||||
- env: TOX_SUFFIX="lint"
|
|
||||||
python: "3.7"
|
|
||||||
|
|
||||||
python:
|
|
||||||
- "3.6"
|
|
||||||
- "3.7"
|
|
||||||
- "3.8"
|
|
||||||
- "pypy3"
|
|
||||||
|
|
||||||
before_install:
|
|
||||||
- openssl version
|
|
||||||
- sudo apt-get install libgnutls28-dev
|
|
||||||
|
|
||||||
install:
|
|
||||||
- pip install tox-travis codecov
|
|
||||||
- if [[ $TOX_SUFFIX != 'lint' ]]; then python setup.py install ; fi
|
|
||||||
script:
|
|
||||||
- tox
|
|
||||||
after_success:
|
|
||||||
- codecov
|
|
||||||
@@ -9,7 +9,7 @@ with pip::
|
|||||||
Compatibility
|
Compatibility
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
VCR.py supports Python 3.5+, and `pypy <http://pypy.org>`__.
|
VCR.py supports Python 3.6+, and `pypy <http://pypy.org>`__.
|
||||||
|
|
||||||
The following HTTP libraries are supported:
|
The following HTTP libraries are supported:
|
||||||
|
|
||||||
|
|||||||
4
setup.py
4
setup.py
@@ -59,7 +59,7 @@ setup(
|
|||||||
author_email="me@kevinmccarthy.org",
|
author_email="me@kevinmccarthy.org",
|
||||||
url="https://github.com/kevin1024/vcrpy",
|
url="https://github.com/kevin1024/vcrpy",
|
||||||
packages=find_packages(exclude=["tests*"]),
|
packages=find_packages(exclude=["tests*"]),
|
||||||
python_requires=">=3.5",
|
python_requires=">=3.6",
|
||||||
install_requires=install_requires,
|
install_requires=install_requires,
|
||||||
license="MIT",
|
license="MIT",
|
||||||
tests_require=["pytest", "mock", "pytest-httpbin"],
|
tests_require=["pytest", "mock", "pytest-httpbin"],
|
||||||
@@ -72,6 +72,8 @@ setup(
|
|||||||
"Programming Language :: Python :: 3.6",
|
"Programming Language :: Python :: 3.6",
|
||||||
"Programming Language :: Python :: 3.7",
|
"Programming Language :: Python :: 3.7",
|
||||||
"Programming Language :: Python :: 3.8",
|
"Programming Language :: Python :: 3.8",
|
||||||
|
"Programming Language :: Python :: 3.9",
|
||||||
|
"Programming Language :: Python :: 3.10",
|
||||||
"Programming Language :: Python :: 3 :: Only",
|
"Programming Language :: Python :: 3 :: Only",
|
||||||
"Programming Language :: Python :: Implementation :: CPython",
|
"Programming Language :: Python :: Implementation :: CPython",
|
||||||
"Programming Language :: Python :: Implementation :: PyPy",
|
"Programming Language :: Python :: Implementation :: PyPy",
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
"""Test requests' interaction with vcr"""
|
"""Test requests' interaction with vcr"""
|
||||||
import platform
|
|
||||||
import pytest
|
import pytest
|
||||||
import sys
|
|
||||||
import vcr
|
import vcr
|
||||||
from assertions import assert_cassette_empty, assert_is_json
|
from assertions import assert_cassette_empty, assert_is_json
|
||||||
|
|
||||||
@@ -117,10 +114,6 @@ def test_post_chunked_binary(tmpdir, httpbin):
|
|||||||
|
|
||||||
|
|
||||||
@pytest.mark.skipif("sys.version_info >= (3, 6)", strict=True, raises=ConnectionError)
|
@pytest.mark.skipif("sys.version_info >= (3, 6)", strict=True, raises=ConnectionError)
|
||||||
@pytest.mark.skipif(
|
|
||||||
(3, 5) < sys.version_info < (3, 6) and platform.python_implementation() == "CPython",
|
|
||||||
reason="Fails on CPython 3.5",
|
|
||||||
)
|
|
||||||
def test_post_chunked_binary_secure(tmpdir, httpbin_secure):
|
def test_post_chunked_binary_secure(tmpdir, httpbin_secure):
|
||||||
"""Ensure that we can send chunked binary without breaking while trying to concatenate bytes with str."""
|
"""Ensure that we can send chunked binary without breaking while trying to concatenate bytes with str."""
|
||||||
data1 = iter([b"data", b"to", b"send"])
|
data1 = iter([b"data", b"to", b"send"])
|
||||||
|
|||||||
21
tox.ini
21
tox.ini
@@ -3,10 +3,20 @@ skip_missing_interpreters=true
|
|||||||
envlist =
|
envlist =
|
||||||
cov-clean,
|
cov-clean,
|
||||||
lint,
|
lint,
|
||||||
{py36,py37,py38}-{requests,httplib2,urllib3,tornado4,boto3,aiohttp,httpx},
|
{py36,py37,py38,py39,py310}-{requests,httplib2,urllib3,tornado4,boto3,aiohttp,httpx},
|
||||||
{pypy3}-{requests,httplib2,urllib3,tornado4,boto3},
|
{pypy3}-{requests,httplib2,urllib3,tornado4,boto3},
|
||||||
cov-report
|
cov-report
|
||||||
|
|
||||||
|
|
||||||
|
[gh-actions]
|
||||||
|
python =
|
||||||
|
3.6: py36
|
||||||
|
3.7: py37, lint
|
||||||
|
3.8: py38
|
||||||
|
3.9: py39
|
||||||
|
3.10: py310
|
||||||
|
pypy-3: pypy3
|
||||||
|
|
||||||
# Coverage environment tasks: cov-clean and cov-report
|
# Coverage environment tasks: cov-clean and cov-report
|
||||||
# https://pytest-cov.readthedocs.io/en/latest/tox.html
|
# https://pytest-cov.readthedocs.io/en/latest/tox.html
|
||||||
[testenv:cov-clean]
|
[testenv:cov-clean]
|
||||||
@@ -32,6 +42,7 @@ commands =
|
|||||||
deps =
|
deps =
|
||||||
flake8
|
flake8
|
||||||
black
|
black
|
||||||
|
basepython = python3.7
|
||||||
|
|
||||||
[testenv:docs]
|
[testenv:docs]
|
||||||
# Running sphinx from inside the "docs" directory
|
# Running sphinx from inside the "docs" directory
|
||||||
@@ -78,11 +89,11 @@ deps =
|
|||||||
aiohttp: pytest-asyncio
|
aiohttp: pytest-asyncio
|
||||||
aiohttp: pytest-aiohttp
|
aiohttp: pytest-aiohttp
|
||||||
httpx: httpx
|
httpx: httpx
|
||||||
{py36,py37,py38}-{httpx}: httpx
|
{py36,py37,py38,py39,py310}-{httpx}: httpx
|
||||||
{py36,py37,py38}-{httpx}: pytest-asyncio
|
{py36,py37,py38,py39,py310}-{httpx}: pytest-asyncio
|
||||||
depends =
|
depends =
|
||||||
lint,{py36,py37,py38,pypy3}-{requests,httplib2,urllib3,tornado4,boto3},{py36,py37,py38}-{aiohttp},{py36,py37,py38}-{httpx}: cov-clean
|
lint,{py36,py37,py38,py39,py310,pypy3}-{requests,httplib2,urllib3,tornado4,boto3},{py36,py37,py38,py39,py310}-{aiohttp},{py36,py37,py38,py39,py310}-{httpx}: cov-clean
|
||||||
cov-report: lint,{py36,py37,py38,pypy3}-{requests,httplib2,urllib3,tornado4,boto3},{py36,py37,py38}-{aiohttp}
|
cov-report: lint,{py36,py37,py38,py39,py310,pypy3}-{requests,httplib2,urllib3,tornado4,boto3},{py36,py37,py38,py39,py310}-{aiohttp}
|
||||||
passenv =
|
passenv =
|
||||||
AWS_ACCESS_KEY_ID
|
AWS_ACCESS_KEY_ID
|
||||||
AWS_DEFAULT_REGION
|
AWS_DEFAULT_REGION
|
||||||
|
|||||||
Reference in New Issue
Block a user