-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #51 from Tivix/develop
merging 'develop' into master
- Loading branch information
Showing
29 changed files
with
1,332 additions
and
312 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,4 @@ | ||
[flake8] | ||
max-line-length=110 | ||
ignore=F403,F405,W605,W503,E203,E231 | ||
exclude=setup.py,__init__.py,.eggs,runtests.py |
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,100 @@ | ||
name: lint and test | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- develop | ||
|
||
jobs: | ||
lint-and-test: | ||
runs-on: ubuntu-18.04 | ||
strategy: | ||
# By default, GitHub will maximize the number of jobs run in parallel | ||
# depending on the available runners on GitHub-hosted virtual machines. | ||
# max-parallel: 8 | ||
fail-fast: false | ||
matrix: | ||
python-version: | ||
- "3.4" | ||
- "3.5" | ||
- "3.6" | ||
- "3.7" | ||
- "3.8" | ||
- "3.9" | ||
django-version: | ||
- "2.0" | ||
- "2.1" | ||
- "2.2" # LTS | ||
- "3.0" | ||
- "3.1" | ||
- "3.2" # LTS | ||
exclude: | ||
# Python 3.4 is not compatible with Django 2.0+ | ||
- python-version: "3.4" | ||
django-version: "2.1" | ||
- python-version: "3.4" | ||
django-version: "2.2" | ||
- python-version: "3.4" | ||
django-version: "3.0" | ||
- python-version: "3.4" | ||
django-version: "3.1" | ||
- python-version: "3.4" | ||
django-version: "3.2" | ||
# Python 3.5 is not compatible with Django 2.2+ | ||
- python-version: "3.5" | ||
django-version: "3.0" | ||
- python-version: "3.5" | ||
django-version: "3.1" | ||
- python-version: "3.5" | ||
django-version: "3.2" | ||
# Python 3.8 is compatible with Django 2.2+ | ||
- python-version: "3.8" | ||
django-version: "2.0" | ||
- python-version: "3.8" | ||
django-version: "2.1" | ||
# Python 3.9 is compatible with Django 3.1+ | ||
- python-version: "3.9" | ||
django-version: "2.0" | ||
- python-version: "3.9" | ||
django-version: "2.1" | ||
- python-version: "3.9" | ||
django-version: "2.2" | ||
- python-version: "3.9" | ||
django-version: "3.0" | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Upgrade pip version | ||
run: | | ||
python -m pip install -U pip | ||
- name: Upgrade django version | ||
run: | | ||
python -m pip install "Django~=${{ matrix.django-version }}.0" | ||
- name: Python and Django versions | ||
run: | | ||
echo "Python ${{ matrix.python-version }} -> Django ${{ matrix.django-version }}" | ||
python --version | ||
echo "Django: `django-admin --version`" | ||
- name: run tests | ||
run: | | ||
python -m pip install coverage | ||
coverage run --source=django_spam setup.py test | ||
coverage report | ||
coverage xml -o coverage.xml | ||
- name: Codecov | ||
if: success() | ||
uses: codecov/codecov-action@v2 | ||
with: | ||
file: coverage.xml | ||
flags: unittests |
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
## Demo using django-spam | ||
|
||
This demo is provided as a convenience feature to allow potential users to try the app straight from the app repo without having to create a django project. | ||
|
||
It can also be used to develop the app in place. | ||
|
||
To run this example, follow these instructions: | ||
|
||
1. Navigate to the `demo` directory | ||
|
||
2. Install required packages with Poetry. | ||
|
||
poetry install | ||
|
||
3. Make and apply migrations | ||
|
||
poetry run python manage.py makemigrations | ||
poetry run python manage.py migrate | ||
4. Run the server | ||
|
||
poetry run python manage.py runserver | ||
4. Access from the browser at `http://127.0.0.1:8000` |
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.