Skip to content
This repository has been archived by the owner on Jun 9, 2023. It is now read-only.

Commit

Permalink
Merge 50ff93c into 5b830c3
Browse files Browse the repository at this point in the history
  • Loading branch information
bboe committed Jan 5, 2020
2 parents 5b830c3 + 50ff93c commit ada1247
Show file tree
Hide file tree
Showing 6 changed files with 72 additions and 13 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
jobs:
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 prawtools --module pytest
- env:
#COVERALLS_PARALLEL: true
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
name: Submit to coveralls
run: coveralls --verbose
strategy:
matrix:
python-version: [3.5, 3.6, 3.7, 3.8]
# 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

name: CI
on: [pull_request, push]
7 changes: 3 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
cache: pip
install: pip install coveralls
install: pip install .[ci,test]
jobs:
include:
- install: pip install black flake8 pydocstyle
- install: pip install .[lint]
python: 3.8
script:
- black --check --verbose *.py prawtools tests
Expand All @@ -18,8 +18,7 @@ python:
- 3.7
- 3.8
script:
- coverage run --source=prawtools setup.py test
- coveralls
- coverage run --source=prawtools --module pytest
stages:
- lint
- test
2 changes: 0 additions & 2 deletions setup.cfg

This file was deleted.

22 changes: 15 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,19 @@
VERSION = re.search('__version__ = "([^"]+)', fp.read()).group(1)


extras = {
"ci": ["coveralls"],
"lint": ["black", "flake8", "pydocstyle"],
"test": [
"betamax >=0.7.1, <0.8",
"betamax-serializers >=0.2.0, <0.3",
"mock ==1.0.1",
"pytest",
],
}
required = ["praw >=4.0.0, <7", "six >=1, <2"]


setup(
name=PACKAGE_NAME,
author="Bryce Boe",
Expand All @@ -39,17 +52,12 @@
"subreddit_stats = prawtools.stats:main",
]
},
install_requires=["praw >=4.0.0, <7", "six >=1, <2"],
extras_require=extras,
install_requires=required,
keywords="reddit mod moderator subreddit statistics tools",
license="Simplified BSD License",
long_description=README,
packages=[PACKAGE_NAME],
test_suite="tests",
tests_require=[
"betamax >=0.7.1, <0.8",
"betamax-serializers >=0.2.0, <0.3",
"mock ==1.0.1",
],
url="https://github.com/praw-dev/prawtools",
version=VERSION,
)
File renamed without changes.
Empty file modified tests/test_stats.py
100755 → 100644
Empty file.

0 comments on commit ada1247

Please sign in to comment.