10000 test: Run tests against django main branch by marksweb · Pull Request #7650 · django-cms/django-cms · GitHub
[go: up one dir, main page]

Skip to content

test: Run tests against django main branch #7650

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Sep 22, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
138 changes: 135 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}

uses: actions/setup-python@v2
Expand Down Expand Up @@ -93,7 +93,7 @@ jobs:


steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}

uses: actions/setup-python@v2
Expand Down Expand Up @@ -136,7 +136,7 @@ jobs:
]

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}

uses: actions/setup-python@v2
Expand All @@ -155,3 +155,135 @@ jobs:
run: python manage.py test
env:
DATABASE_URL: sqlite://localhost/testdb.sqlite

django-main-sqlite:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ['3.11']
requirements-file: ['requirements_base.txt']
django-version: [
'https://github.com/django/django/archive/main.tar.gz'
]
os: [
ubuntu-20.04,
]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}

uses: actions/setup-python@v4
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 ${{ matrix.django-version }}
pip install -r test_requirements/${{ matrix.requirements-file }}
python setup.py install

- name: Test with django test runner
run: python manage.py test
continue-on-error: true
env:
DATABASE_URL: sqlite://localhost/testdb.sqlite

django-main-postgres:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ['3.11']
requirements-file: ['requirements_base.txt']
django-version: [
'https://github.com/django/django/archive/main.tar.gz'
]
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@v4
- name: Set up Python ${{ matrix.python-version }}

uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install dependencies
run: |
sudo apt install gettext gcc -y
python -m pip install --upgrade pip
pip install pytest ${{ matrix.django-version }}
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:
DATABASE_URL: postgres://postgres:postgres@127.0.0.1/postgres

django-main-mysql:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ['3.11']
requirements-file: ['requirements_base.txt']
django-version: [
'https://github.com/django/django/archive/main.tar.gz'
]
os: [
ubuntu-20.04,
]

services:
mysql:
image: mysql:8.0
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@v4
- name: Set up Python ${{ matrix.python-version }}

uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install dependencies
run: |
sudo apt install gettext gcc -y
python -m pip install --upgrade pip
pip install pytest ${{ matrix.django-version }}
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:
DATABASE_URL: mysql://root@127.0.0.1/djangocms_test
0