Skip to content

Commit

Permalink
Merge bb0e00c into d936697
Browse files Browse the repository at this point in the history
  • Loading branch information
bboe committed Jan 5, 2020
2 parents d936697 + bb0e00c commit d27db21
Show file tree
Hide file tree
Showing 8 changed files with 71 additions and 39 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/ci.yml
@@ -0,0 +1,53 @@
jobs:
complete_coverals:
needs: test
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: 3.x
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[lint]
- name: Run black
run: black --check --verbose .
- name: Run flake8
run: flake8 . --statistics
- name: Run pydocstyle
run: pydocstyle
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[test]
pip install https://github.com/bboe/coveralls-python/archive/github_actions.zip
- name: Test with pytest
run: coverage run --source prawcore --module pytest
- env:
COVERALLS_PARALLEL: true
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
name: Submit to coveralls
run: coveralls
strategy:
matrix:
python-version: [3.5, 3.6, 3.7, 3.8]
name: CI
on: [pull_request, push]
24 changes: 0 additions & 24 deletions .travis.yml

This file was deleted.

2 changes: 0 additions & 2 deletions setup.cfg

This file was deleted.

25 changes: 15 additions & 10 deletions setup.py
Expand Up @@ -13,6 +13,19 @@
with open(path.join(HERE, PACKAGE_NAME, "const.py"), encoding="utf-8") as fp:
VERSION = re.search('__version__ = "([^"]+)"', fp.read()).group(1)

extras = {
"ci": ["coveralls"],
"lint": ["black", "flake8", "pre-commit", "pydocstyle"],
"test": [
"betamax >=0.8, <0.9",
"betamax_matchers >=0.4.0, <0.5",
"betamax-serializers >=0.2.0, <0.3",
"mock >=0.8",
"pytest",
"testfixtures >4.13.2, <7",
],
}
extras["dev"] = extras["lint"] + extras["test"]

setup(
name=PACKAGE_NAME,
Expand All @@ -29,23 +42,15 @@
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: 3.8",
],
description="Low-level communication layer for PRAW 4+.",
extras_require={"dev": ["pre-commit"]},
extras_require=extras,
install_requires=["requests >=2.6.0, <3.0"],
keywords="praw reddit api",
license="Simplified BSD License",
long_description=README,
packages=[PACKAGE_NAME],
tests_require=[
"betamax >=0.8, <0.9",
"betamax_matchers >=0.4.0, <0.5",
"betamax-serializers >=0.2.0, <0.3",
"mock >=0.8",
"testfixtures >4.13.2, <7",
],
test_suite="tests",
url="https://github.com/praw-dev/prawcore",
version=VERSION,
)
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/test_authenticator.py
@@ -1,7 +1,7 @@
"""Test for sublcasses of prawcore.auth.BaseAuthenticator class."""
import prawcore
import unittest
from .config import CLIENT_ID, CLIENT_SECRET, REDIRECT_URI, REQUESTOR
from .conftest import CLIENT_ID, CLIENT_SECRET, REDIRECT_URI, REQUESTOR
from betamax import Betamax


Expand Down
2 changes: 1 addition & 1 deletion tests/test_authorizer.py
@@ -1,7 +1,7 @@
"""Test for prawcore.auth.Authorizer classes."""
import prawcore
import unittest
from .config import (
from .conftest import (
CLIENT_ID,
CLIENT_SECRET,
PASSWORD,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_sessions.py
Expand Up @@ -14,7 +14,7 @@
)
from testfixtures import LogCapture

from .config import (
from .conftest import (
CLIENT_ID,
CLIENT_SECRET,
REFRESH_TOKEN,
Expand Down

0 comments on commit d27db21

Please sign in to comment.