mirror of
https://github.com/kevin1024/vcrpy.git
synced 2025-12-08 16:53:23 +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
|
||||
-------------
|
||||
|
||||
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:
|
||||
|
||||
|
||||
4
setup.py
4
setup.py
@@ -59,7 +59,7 @@ setup(
|
||||
author_email="me@kevinmccarthy.org",
|
||||
url="https://github.com/kevin1024/vcrpy",
|
||||
packages=find_packages(exclude=["tests*"]),
|
||||
python_requires=">=3.5",
|
||||
python_requires=">=3.6",
|
||||
install_requires=install_requires,
|
||||
license="MIT",
|
||||
tests_require=["pytest", "mock", "pytest-httpbin"],
|
||||
@@ -72,6 +72,8 @@ setup(
|
||||
"Programming Language :: Python :: 3.6",
|
||||
"Programming Language :: Python :: 3.7",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3 :: Only",
|
||||
"Programming Language :: Python :: Implementation :: CPython",
|
||||
"Programming Language :: Python :: Implementation :: PyPy",
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""Test requests' interaction with vcr"""
|
||||
import platform
|
||||
import pytest
|
||||
import sys
|
||||
import vcr
|
||||
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(
|
||||
(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):
|
||||
"""Ensure that we can send chunked binary without breaking while trying to concatenate bytes with str."""
|
||||
data1 = iter([b"data", b"to", b"send"])
|
||||
|
||||
21
tox.ini
21
tox.ini
@@ -3,10 +3,20 @@ skip_missing_interpreters=true
|
||||
envlist =
|
||||
cov-clean,
|
||||
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},
|
||||
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
|
||||
# https://pytest-cov.readthedocs.io/en/latest/tox.html
|
||||
[testenv:cov-clean]
|
||||
@@ -32,6 +42,7 @@ commands =
|
||||
deps =
|
||||
flake8
|
||||
black
|
||||
basepython = python3.7
|
||||
|
||||
[testenv:docs]
|
||||
# Running sphinx from inside the "docs" directory
|
||||
@@ -78,11 +89,11 @@ deps =
|
||||
aiohttp: pytest-asyncio
|
||||
aiohttp: pytest-aiohttp
|
||||
httpx: httpx
|
||||
{py36,py37,py38}-{httpx}: httpx
|
||||
{py36,py37,py38}-{httpx}: pytest-asyncio
|
||||
{py36,py37,py38,py39,py310}-{httpx}: httpx
|
||||
{py36,py37,py38,py39,py310}-{httpx}: pytest-asyncio
|
||||
depends =
|
||||
lint,{py36,py37,py38,pypy3}-{requests,httplib2,urllib3,tornado4,boto3},{py36,py37,py38}-{aiohttp},{py36,py37,py38}-{httpx}: cov-clean
|
||||
cov-report: lint,{py36,py37,py38,pypy3}-{requests,httplib2,urllib3,tornado4,boto3},{py36,py37,py38}-{aiohttp}
|
||||
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,py39,py310,pypy3}-{requests,httplib2,urllib3,tornado4,boto3},{py36,py37,py38,py39,py310}-{aiohttp}
|
||||
passenv =
|
||||
AWS_ACCESS_KEY_ID
|
||||
AWS_DEFAULT_REGION
|
||||
|
||||
Reference in New Issue
Block a user