Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
c6c561c
Removed too generic . preventing adding new files to .github
JonathanHuot Nov 24, 2021
db20f63
Initial migration from Travis to GitHub Actions
JonathanHuot Nov 24, 2021
fdf7aaa
Fix yaml syntax for env variable
JonathanHuot Nov 24, 2021
147cfc9
Fix typo of TOXENV
JonathanHuot Nov 24, 2021
396b8ac
Cleaner name
JonathanHuot Nov 24, 2021
8556801
Fix python2.7 tests
JonathanHuot Nov 24, 2021
7991314
Fix pypy27 support
JonathanHuot Nov 24, 2021
3d61653
Moved to AndreMiras GH Action
JonathanHuot Nov 24, 2021
411a25b
Removed unavailable python versions in GH
JonathanHuot Nov 24, 2021
6d2c359
Revert "Moved to AndreMiras GH Action"
JonathanHuot Nov 24, 2021
3f5209b
Add convertion of .coverage into lcov
JonathanHuot Nov 24, 2021
09eb50d
Moved lcov into default location as the parameter seems not working
JonathanHuot Nov 24, 2021
81dfb45
Add coveralls at the end of pipeline
JonathanHuot Nov 24, 2021
ced08e7
Lcov in both coverallsapp actions
JonathanHuot Nov 24, 2021
16d457e
Convert into lcov after each tests
JonathanHuot Nov 24, 2021
a903cc2
Skip python27 for coveralls (coverage-lcov not present)
JonathanHuot Nov 24, 2021
1c940a0
Fix typo
JonathanHuot Nov 24, 2021
eb8ca20
Double-quote is not allowed
JonathanHuot Nov 24, 2021
16026db
Removed unecessary pip install
JonathanHuot Nov 24, 2021
1166508
Add version to coverallsapp action
JonathanHuot Dec 6, 2021
1cf723e
Fix local theme of docs
JonathanHuot Dec 6, 2021
826c366
Initial version of contributing guide
JonathanHuot Dec 6, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Run Tests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- python-version: 2.7
tox-env: py27
- python-version: 3.6
tox-env: py36
- python-version: 3.7
tox-env: py37,docs,readme,black
- python-version: pypy3
tox-env: pypy3
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 test dependencies
run: |
python -m pip install --upgrade pip setuptools
python -m pip install tox
- name: Install coveralls dependencies
if: ${{ matrix.python-version != '2.7' }}
run: |
python -m pip install coveralls coverage-lcov toml
- name: Execute tests with tox
env:
TOXENV: ${{ matrix.tox-env }}
run: |
tox
- name: Coverage format into lcov
if: ${{ matrix.python-version != '2.7' }}
run: |
coverage-lcov --output_file_path lcov.info
- name: Coveralls Parallel
uses: coverallsapp/[email protected]
if: ${{ matrix.python-version != '2.7' }}
with:
github-token: ${{ secrets.github_token }}
flag-name: run-${{ matrix.python-version }}
path-to-lcov: lcov.info
parallel: true
finish:
needs: tests
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
path-to-lcov: lcov.info
parallel-finished: true
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ dist/
.tox/

.workon
.*/

t.py

Expand Down
30 changes: 0 additions & 30 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = "default"
html_theme = "sphinx_rtd_theme"

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
Expand Down
54 changes: 54 additions & 0 deletions docs/contributing.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
============
Contributing
============

Test simple changes
===================

Requests-OAuthlib is using `tox`_ as main test tool.
It helps creating the required virtualenv for your python version.
For example, if you have installed Python3.7:

.. sourcecode:: bash

$ tox -e py37


Validate documentation changes
==============================

Tox contains also a build method to generate documentation locally.

.. sourcecode:: bash

$ tox -e docs,readme

Then open the HTML page in `_build/html/index.html`


Verify all pythons versions
===========================

Requests-OAuthlib supports multiple versions of Python.
You can test all Python versions conveniently using `tox`_.

.. sourcecode:: bash

$ tox

In order to run successfully, you will need all versions of Python installed. We recommend using `pyenv`_ to install those Python versions.

.. sourcecode:: bash

$ pyenv install 2.7.18
$ pyenv install 3.4.10
$ pyenv install 3.5.10
$ pyenv install 3.6.14
$ pyenv install 3.7.11
$ pyenv install pypy2.7-7.1.1
$ pyenv install pypy3.6-7.1.1

.. _`tox`: https://tox.readthedocs.io/en/latest/install.html
.. _`virtualenv`: https://virtualenv.pypa.io/en/latest/installation/
.. _`pyenv`: https://github.com/pyenv/pyenv

1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ Getting Started:
examples/examples

api
contributing



Expand Down
5 changes: 5 additions & 0 deletions requirements-test-27.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
coveralls==1.11.1
mock==3.0.5
requests-mock==1.9.3
requests==2.26.0
oauthlib[signedtoken]==3.1.0
9 changes: 9 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@ deps=
-r{toxinidir}/requirements-test.txt
commands=coverage run --source=requests_oauthlib -m unittest discover

# special py27 requirements as upstream libraries stopped
# supporting latest versions
[testenv:py27]
deps=
-r{toxinidir}/requirements-test-27.txt
[testenv:pypy]
deps=
-r{toxinidir}/requirements-test-27.txt

# tox -e docs to mimick readthedocs build.
# should be similar to .readthedocs.yaml pipeline
[testenv:docs]
Expand Down