Skip to content

Commit

Permalink
Merge dd63ff3 into ffefec2
Browse files Browse the repository at this point in the history
  • Loading branch information
PythonCoderAS committed Dec 25, 2019
2 parents ffefec2 + dd63ff3 commit d199855
Showing 1 changed file with 64 additions and 0 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Python package

on: [push, pull_request]

jobs:
lint:
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 3 # We need this limit or else the tests fail
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
python-version: [3.6, 3.7, 3.8]

steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade all installed pip packages (setuptools, pip, etc.)
run: pip list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip install -U
- name: Install project dependencies
run: python setup.py install
- name: Install test dependencies
run: pip install black flake8 pydocstyle sphinx sphinx_rtd_theme
- name: Check code formatting with black
run: black --check --verbose .
- name: Lint with flake8
run: flake8 --exclude=.eggs,build,docs
- name: Check docstyle with pydocstyle
run: pydocstyle praw
- name: Build Sphinx files
run: sphinx-build -W docs/ /tmp/foo
test:
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 4 # We need this limit or else the tests fail
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
python-version: [3.5, 3.6, 3.7, 3.8]
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade all installed pip packages (setuptools, pip, etc.)
run: pip list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip install -U
- name: Get wheel
run: pip install wheel
- name: Install project dependencies
run: python setup.py install
- name: Install test dependencies
run: pip install pytest coverage
- name: Install betamax and plugins
# Windows + Python 3.8 bypass attempts
run: |
pip install "betamax >=0.8, <0.9"
pip install "betamax-matchers >=0.3.0, <0.5"
pip install "betamax-serializers >=0.2, <0.3"
- name: Run tests
run: python -m coverage run ./setup.py test
- name: Print coverage
run: coverage report --include "praw/*" --fail-under=100

0 comments on commit d199855

Please sign in to comment.