-
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.
Merge pull request #42 from ambitioninc/chore/django4
Django4 compatibility
- Loading branch information
Showing
19 changed files
with
237 additions
and
274 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,87 @@ | ||
name: django-issue tests | ||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master,develop ] | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
# python: [ '3.7','3.8','3.9','3.10','3.11' ] | ||
python: [ '3.7','3.8','3.9' ] | ||
# Time to switch to pytest or nose2? | ||
# nosetests is broken on 3.10 | ||
# AttributeError: module 'collections' has no attribute 'Callable' | ||
# https://github.com/nose-devs/nose/issues/1099 | ||
django: | ||
- 'Django~=3.2.0' | ||
- 'Django~=4.0.0' | ||
- 'Django~=4.1.0' | ||
- 'Django~=4.2.0' | ||
exclude: | ||
- python: '3.7' | ||
django: 'Django~=4.0.0' | ||
- python: '3.7' | ||
django: 'Django~=4.1.0' | ||
- python: '3.7' | ||
django: 'Django~=4.2.0' | ||
services: | ||
postgres: | ||
image: postgres:14.5 | ||
env: | ||
POSTGRES_DB: postgres | ||
POSTGRES_PASSWORD: postgres | ||
POSTGRES_USER: postgres | ||
POSTGRES_HOST_AUTH_METHOD: trust | ||
ports: | ||
- 5432:5432 | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
- name: Install requirements | ||
run: | | ||
python --version | ||
pip install --upgrade pip wheel setuptools | ||
pip install -r requirements/requirements.txt | ||
pip install -r requirements/requirements-testing.txt | ||
pip install "${{ matrix.django }}" | ||
pip freeze | ||
- name: Run tests | ||
env: | ||
DB_SETTINGS: >- | ||
{ | ||
"ENGINE":"django.db.backends.postgresql", | ||
"NAME":"issue", | ||
"USER":"postgres", | ||
"PASSWORD":"postgres", | ||
"HOST":"localhost", | ||
"PORT":"5432" | ||
} | ||
# DB_SETTINGS2: >- | ||
# { | ||
# "ENGINE":"django.db.backends.postgresql", | ||
# "NAME":"issue2", | ||
# "USER":"postgres", | ||
# "PASSWORD":"postgres", | ||
# "HOST":"localhost", | ||
# "PORT":"5432" | ||
# } | ||
run: | | ||
python manage.py check | ||
coverage run manage.py test issue | ||
coverage report --fail-under=90 | ||
# continue-on-error: ${{ matrix.experimental }} | ||
- name: Check style | ||
run: flake8 issue |
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 |
---|---|---|
@@ -1,4 +1,2 @@ | ||
# flake8: noqa | ||
from .version import __version__ | ||
|
||
default_app_config = 'issue.apps.IssueConfig' |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.