-
Notifications
You must be signed in to change notification settings - Fork 7
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
Showing
40 changed files
with
919 additions
and
428 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,6 @@ | ||
[bumpversion] | ||
commit = False | ||
tag = False | ||
current_version = 2.0.0 | ||
|
||
[bumpversion:file:setup.cfg] |
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,14 @@ | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 4 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.{scss,sass}] | ||
indent_size = 2 | ||
|
||
[*.{yml,yaml}] | ||
indent_size = 2 |
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,78 @@ | ||
name: Run CI | ||
|
||
# Run this workflow every time a new commit pushed to your repository | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- develop | ||
tags: | ||
- '*' | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python: ['3.7', '3.8', '3.9', '3.10'] | ||
django: ['2.2', '3.2'] | ||
|
||
services: | ||
postgres: | ||
image: postgres:12 | ||
env: | ||
POSTGRES_HOST_AUTH_METHOD: trust | ||
ports: | ||
- 5432:5432 | ||
# Needed because the postgres container does not provide a healthcheck | ||
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | ||
|
||
name: Run the test suite (Python ${{ matrix.python }}, Django ${{ matrix.django }}) | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
|
||
- name: Install dependencies | ||
run: pip install tox tox-gh-actions codecov | ||
|
||
- name: Run tests | ||
run: | | ||
export TOXENV=py${PYTHON_VERSION/./}-django${DJANGO/./} | ||
tox | ||
codecov -e TOXENV,DJANGO --file reports/coverage-${TOXENV}.xml | ||
env: | ||
PYTHON_VERSION: ${{ matrix.python }} | ||
DJANGO: ${{ matrix.django }} | ||
PGHOST: localhost | ||
|
||
- name: Publish coverage report | ||
uses: codecov/codecov-action@v1 | ||
|
||
publish: | ||
name: Publish package to PyPI | ||
runs-on: ubuntu-latest | ||
needs: tests | ||
|
||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.8' | ||
|
||
- name: Build sdist and wheel | ||
run: | | ||
pip install pip setuptools wheel --upgrade | ||
python setup.py sdist bdist_wheel | ||
- name: Publish a Python distribution to PyPI | ||
uses: pypa/gh-action-pypi-publish@v1.4.1 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_TOKEN }} |
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,33 @@ | ||
name: Code quality checks | ||
|
||
# Run this workflow every time a new commit pushed to your repository | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- develop | ||
tags: | ||
paths: | ||
- '**.py' | ||
pull_request: | ||
paths: | ||
- '**.py' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
linting: | ||
name: Code-quality checks | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
toxenv: [isort, black] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.7' | ||
- name: Install dependencies | ||
run: pip install tox | ||
- run: tox | ||
env: | ||
TOXENV: ${{ matrix.toxenv }} |
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 |
---|---|---|
|
@@ -46,6 +46,7 @@ coverage.xml | |
cover/* | ||
.hypothesis/ | ||
junit*.xml | ||
reports/ | ||
|
||
# Translations | ||
*.pot | ||
|
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
Oops, something went wrong.