-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c21cf0c
commit f093a0a
Showing
24 changed files
with
264 additions
and
158 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
[flake8] | ||
enable-extensions = G | ||
max-doc-length = 90 | ||
max-line-length = 90 | ||
select = A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,B901,B902,B903,B950 | ||
# E226: Missing whitespace around arithmetic operators can help group things together. | ||
# E501: Superseeded by B950 (from Bugbear) | ||
# E722: Superseeded by B001 (from Bugbear) | ||
# W503: Mutually exclusive with W504. | ||
ignore = E226,E501,E722,W503 | ||
per-file-ignores = | ||
# S101: Pytest uses assert | ||
tests/*:S101 | ||
# I900: Don't need demo requirements to be installed | ||
demo/*:I900 | ||
|
||
# flake8-import-order | ||
application-import-names = aiohttp_security | ||
import-order-style = pycharm | ||
|
||
# flake8-quotes | ||
inline-quotes = " | ||
# flake8-requirements | ||
requirements-file = requirements-dev.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- '[0-9].[0-9]+' | ||
tags: [ 'v*' ] | ||
pull_request: | ||
branches: | ||
- master | ||
- '[0-9].[0-9]+' | ||
|
||
jobs: | ||
lint: | ||
name: Linter | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.9 | ||
cache: 'pip' | ||
cache-dependency-path: '**/requirements*.txt' | ||
- name: Install dependencies | ||
uses: py-actions/py-dependency-install@v3 | ||
with: | ||
path: requirements-dev.txt | ||
- name: Install itself | ||
run: | | ||
pip install . | ||
- name: Run linter | ||
run: | | ||
make lint | ||
- name: Prepare twine checker | ||
run: | | ||
pip install -U build twine wheel | ||
python -m build | ||
- name: Run twine checker | ||
run: | | ||
twine check dist/* | ||
test: | ||
name: Tests | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
pyver: ['3.7', '3.8', '3.9', '3.10'] | ||
include: | ||
- pyver: pypy-3.8 | ||
timeout-minutes: 15 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.pyver }} | ||
cache: 'pip' | ||
cache-dependency-path: '**/requirements*.txt' | ||
- name: Install dependencies | ||
uses: py-actions/py-dependency-install@v3 | ||
with: | ||
path: requirements-dev.txt | ||
- name: Run unittests | ||
env: | ||
COLOR: 'yes' | ||
run: | | ||
pytest tests --cov-report xml | ||
python -m coverage xml | ||
- name: Upload coverage | ||
uses: codecov/codecov-action@v1 | ||
with: | ||
file: ./coverage.xml | ||
flags: unit | ||
fail_ci_if_error: false | ||
|
||
check: # This job does nothing and is only used for the branch protection | ||
if: always() | ||
|
||
needs: [lint, test] | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Decide whether the needed jobs succeeded or failed | ||
uses: re-actors/alls-green@release/v1 | ||
with: | ||
jobs: ${{ toJSON(needs) }} | ||
|
||
deploy: | ||
name: Deploy | ||
environment: release | ||
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') | ||
needs: [check] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Update pip, wheel, setuptools, build, twine | ||
run: | | ||
python -m pip install -U pip wheel setuptools build twine | ||
- name: Build dists | ||
run: | | ||
python -m build | ||
- name: Make Release | ||
uses: aio-libs/create-release@v1 | ||
with: | ||
changes_file: CHANGES.txt | ||
name: aiohttp-security | ||
version_file: aiohttp_security/__init__.py | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
pypi_token: ${{ secrets.PYPI_API_TOKEN }} | ||
dist_dir: dist | ||
fix_issue_regex: "`#(\\d+) <https://github.com/aio-libs/aiohttp-security/issues/\\1>`" | ||
fix_issue_repl: "(#\\1)" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.