Skip to content

Commit

Permalink
Move CI to Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
nateprewitt committed Nov 11, 2020
1 parent 2f70990 commit 9cd2d33
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 324 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/run-tests.yml
@@ -0,0 +1,31 @@
name: Tests

on: [push, pull_request]

jobs:
build:
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
python-version: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9]
os: [ubuntu-latest, macOS-latest, windows-latest]
include:
# pypy3 on Mac OS currently fails trying to compile
# brotlipy. Moving pypy3 to only test linux.
- python-version: pypy3
os: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
make
- name: Run tests
run: |
make ci
26 changes: 0 additions & 26 deletions .travis.yml

This file was deleted.

14 changes: 7 additions & 7 deletions Makefile
@@ -1,21 +1,21 @@
.PHONY: docs
init:
pip install pipenv --upgrade
pipenv install --dev
pip install -e .[socks]
pip install -r requirements-dev.txt
test:
# This runs all of the tests, on both Python 2 and Python 3.
detox
ci:
pipenv run py.test -n 8 --boxed --junitxml=report.xml
pytest tests --junitxml=report.xml

test-readme:
@pipenv run python setup.py check --restructuredtext --strict && ([ $$? -eq 0 ] && echo "README.rst and HISTORY.rst ok") || echo "Invalid markup in README.rst or HISTORY.rst!"
python setup.py check --restructuredtext --strict && ([ $$? -eq 0 ] && echo "README.rst and HISTORY.rst ok") || echo "Invalid markup in README.rst or HISTORY.rst!"

flake8:
pipenv run flake8 --ignore=E501,F401,E128,E402,E731,F821 requests
flake8 --ignore=E501,F401,E128,E402,E731,F821 requests

coverage:
pipenv run py.test --cov-config .coveragerc --verbose --cov-report term --cov-report xml --cov=requests tests
pytest --cov-config .coveragerc --verbose --cov-report term --cov-report xml --cov=requests tests

publish:
pip install 'twine>=1.5.0'
Expand All @@ -25,4 +25,4 @@ publish:

docs:
cd docs && make html
@echo "\033[95m\n\nBuild successful! View the docs homepage at docs/_build/html/index.html.\n\033[0m"
@echo "\033[95m\n\nBuild successful! View the docs homepage at docs/_build/html/index.html.\n\033[0m"
229 changes: 0 additions & 229 deletions _appveyor/install.ps1

This file was deleted.

62 changes: 0 additions & 62 deletions appveyor.yml

This file was deleted.

6 changes: 6 additions & 0 deletions requirements-dev.txt
@@ -0,0 +1,6 @@
pytest>=2.8.0,<=3.10.1
pytest-cov
pytest-httpbin<1.0
pytest-mock==2.0.0
httpbin==0.7.0
wheel

0 comments on commit 9cd2d33

Please sign in to comment.