Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added custom user environment variables to test suite
- Loading branch information
Showing
3 changed files
with
285 additions
and
0 deletions.
There are no files selected for viewing
File renamed without changes.
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,142 @@ | ||
name: django CMS test.yml | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
database-postgres: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: [ 3.7, 3.8, 3.9, ] # latest release minus two | ||
requirements-file: [ | ||
django-2.2.txt, | ||
django-3.0.txt, | ||
django-3.1.txt, | ||
django-3.2.txt, | ||
] | ||
os: [ | ||
ubuntu-20.04, | ||
] | ||
|
||
services: | ||
postgres: | ||
image: postgres:12 | ||
env: | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: postgres | ||
POSTGRES_DB: postgres | ||
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 | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
|
||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
sudo apt install gettext gcc -y | ||
python -m pip install --upgrade pip | ||
pip install pytest | ||
pip install -r test_requirements/${{ matrix.requirements-file }} | ||
pip install -r test_requirements/databases.txt | ||
python setup.py install | ||
- name: Test with django test runner | ||
run: | | ||
python manage.py test | ||
env: | ||
AUTH_USER_MODEL: "customuserapp.User" | ||
DATABASE_URL: postgres://postgres:postgres@127.0.0.1/postgres | ||
|
||
|
||
database-mysql: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: [ 3.7, 3.8, 3.9, ] # latest release minus two | ||
requirements-file: [ | ||
django-2.2.txt, | ||
django-3.0.txt, | ||
django-3.1.txt, | ||
] | ||
os: [ | ||
ubuntu-20.04, | ||
] | ||
|
||
services: | ||
mysql: | ||
image: mysql:5.7 | ||
env: | ||
MYSQL_ALLOW_EMPTY_PASSWORD: yes | ||
MYSQL_DATABASE: djangocms_test | ||
ports: | ||
- 3306:3306 | ||
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | ||
|
||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
|
||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
sudo apt install gettext gcc -y | ||
python -m pip install --upgrade pip | ||
pip install pytest | ||
pip install -r test_requirements/${{ matrix.requirements-file }} | ||
pip install -r test_requirements/databases.txt | ||
python setup.py install | ||
- name: Test with django test runner | ||
run: | | ||
python manage.py test | ||
env: | ||
AUTH_USER_MODEL: "customuserapp.User" | ||
DATABASE_URL: mysql://root@127.0.0.1/djangocms_test | ||
|
||
database-sqlite: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: [ 3.7, 3.8, 3.9, ] # latest release minus two | ||
requirements-file: [ | ||
django-2.2.txt, | ||
django-3.0.txt, | ||
django-3.1.txt, | ||
] | ||
os: [ | ||
ubuntu-20.04, | ||
] | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
|
||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
sudo apt install gettext gcc -y | ||
python -m pip install --upgrade pip | ||
pip install pytest | ||
pip install -r test_requirements/${{ matrix.requirements-file }} | ||
python setup.py install | ||
- name: Test with django test runner | ||
run: | | ||
python manage.py test | ||
env: | ||
AUTH_USER_MODEL: "customuserapp.User" | ||
DATABASE_URL: sqlite://localhost/testdb.sqlite |
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,143 @@ | ||
name: django CMS test.yml | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
database-postgres: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: [ 3.7, 3.8, 3.9, ] # latest release minus two | ||
requirements-file: [ | ||
django-2.2.txt, | ||
django-3.0.txt, | ||
django-3.1.txt, | ||
django-3.2.txt, | ||
] | ||
os: [ | ||
ubuntu-20.04, | ||
] | ||
|
||
services: | ||
postgres: | ||
image: postgres:12 | ||
env: | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: postgres | ||
POSTGRES_DB: postgres | ||
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 | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
|
||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
sudo apt install gettext gcc -y | ||
python -m pip install --upgrade pip | ||
pip install pytest | ||
pip install -r test_requirements/${{ matrix.requirements-file }} | ||
pip install -r test_requirements/databases.txt | ||
python setup.py install | ||
- name: Test with django test runner | ||
run: | | ||
python manage.py test | ||
env: | ||
AUTH_USER_MODEL: "emailuserapp.EmailUser" | ||
DATABASE_URL: postgres://postgres:postgres@127.0.0.1/postgres | ||
|
||
|
||
database-mysql: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: [ 3.7, 3.8, 3.9, ] # latest release minus two | ||
requirements-file: [ | ||
django-2.2.txt, | ||
django-3.0.txt, | ||
django-3.1.txt, | ||
] | ||
os: [ | ||
ubuntu-20.04, | ||
] | ||
|
||
services: | ||
mysql: | ||
image: mysql:5.7 | ||
env: | ||
MYSQL_ALLOW_EMPTY_PASSWORD: yes | ||
MYSQL_DATABASE: djangocms_test | ||
ports: | ||
- 3306:3306 | ||
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | ||
|
||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
|
||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
sudo apt install gettext gcc -y | ||
python -m pip install --upgrade pip | ||
pip install pytest | ||
pip install -r test_requirements/${{ matrix.requirements-file }} | ||
pip install -r test_requirements/databases.txt | ||
python setup.py install | ||
- name: Test with django test runner | ||
run: | | ||
python manage.py test | ||
env: | ||
AUTH_USER_MODEL: "emailuserapp.EmailUser" | ||
DATABASE_URL: mysql://root@127.0.0.1/djangocms_test | ||
|
||
database-sqlite: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: [ 3.7, 3.8, 3.9, ] # latest release minus two | ||
requirements-file: [ | ||
django-2.2.txt, | ||
django-3.0.txt, | ||
django-3.1.txt, | ||
] | ||
os: [ | ||
ubuntu-20.04, | ||
] | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
|
||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
sudo apt install gettext gcc -y | ||
python -m pip install --upgrade pip | ||
pip install pytest | ||
pip install -r test_requirements/${{ matrix.requirements-file }} | ||
python setup.py install | ||
- name: Test with django test runner | ||
run: | | ||
python manage.py test | ||
env: | ||
AUTH_USER_MODEL: "emailuserapp.EmailUser" | ||
DATABASE_URL: sqlite://localhost/testdb.sqlite |