Skip to content

Commit

Permalink
Merge 9758712 into 9a9b26b
Browse files Browse the repository at this point in the history
  • Loading branch information
alisaifee committed May 15, 2020
2 parents 9a9b26b + 9758712 commit b649539
Show file tree
Hide file tree
Showing 6 changed files with 89 additions and 21 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Lint

on:
push:
paths:
- "**.py"

jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [2.7, 3.7, 3.8]
steps:
- uses: actions/checkout@v2
- name: Cache dependencies
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements/**') }}
restore-keys: |
${{ runner.os }}-pip-
- 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 setuptools wheel
pip install -r requirements/ci.txt
- name: Lint with flake8
run: |
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
49 changes: 49 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: CI

on:
push:
branches: [ '*' ]
pull_request:
branches: [ master ]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [2.7, pypy2, 3.5, 3.7, 3.8, pypy3]
services:
redis:
image: redis
ports:
- 6379:6379
memcached:
image: memcached
ports:
- 11211:11211
steps:
- uses: actions/checkout@v2
- name: Cache dependencies
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements/**') }}
restore-keys: |
${{ runner.os }}-pip-
- 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 setuptools wheel
pip install -r requirements/ci.txt
- name: Test
run: |
nosetests tests --with-cov -v
- name: Coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: |
coveralls
coverage report --fail-under=100 || echo 'Insufficient coverage' && $(exit 1)
19 changes: 0 additions & 19 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion requirements/ci.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
-r test.txt
-r dev.txt
coveralls
4 changes: 3 additions & 1 deletion requirements/dev.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
-r ci.txt
-r test.txt
twine
keyring
flake8
yapf
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ versionfile_build = flask_limiter/_version.py
tag_prefix =
parentdir_prefix = flask-limiter-

[flake8]
exclude = build/**,doc/**,_version.py,version.py,versioneer.py

0 comments on commit b649539

Please sign in to comment.