implement dbshell #39
Workflow file for this run
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
name: Python Tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
workflow_dispatch: | |
concurrency: | |
group: tests-${{ github.ref }} | |
cancel-in-progress: true | |
defaults: | |
run: | |
shell: bash -eux {0} | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
cache: 'pip' | |
cache-dependency-path: 'pyproject.toml' | |
- name: Install Python dependencies | |
run: | | |
python -m pip install -U pip pre-commit | |
- name: Run linters | |
run: | | |
pre-commit run --hook-stage=manual --all-files | |
build: | |
name: Django Test Suite | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout django-mongodb | |
uses: actions/checkout@v4 | |
- name: install the django-mongodb backend | |
run: | | |
pip3 install --upgrade pip | |
pip3 install -e . | |
- name: Checkout Django | |
uses: actions/checkout@v4 | |
with: | |
repository: 'mongodb-forks/django' | |
ref: 'mongodb-5.0.x' | |
path: 'django_repo' | |
- name: Install system packages for Django's Python test dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install libmemcached-dev | |
- name: Install Django and its Python test dependencies | |
run: | | |
cd django_repo/tests/ | |
pip3 install -e .. | |
pip3 install -r requirements/py3.txt | |
- name: Copy the test settings file | |
run: cp .github/workflows/mongodb_settings.py django_repo/tests/ | |
- name: Start MongoDB | |
uses: supercharge/[email protected] | |
with: | |
mongodb-version: 4.4 | |
- name: Run tests | |
run: > | |
python3 django_repo/tests/runtests.py --settings mongodb_settings -v 2 | |
basic | |
empty | |
defer | |
defer_regress | |
from_db_value | |
lookup.tests.LookupTests.test_escaping | |
lookup.tests.LookupTests.test_isnull_textfield | |
lookup.tests.LookupQueryingTests.test_isnull_lookup_in_filter | |
model_fields | |
or_lookups | |
sessions_tests | |
docs: | |
name: Docs Checks | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
cache: 'pip' | |
cache-dependency-path: 'pyproject.toml' | |
python-version: '3.10' | |
- name: Install dependencies | |
run: | | |
pip install -U pip | |
pip install -e ".[docs]" | |
- name: Build docs | |
run: | | |
cd docs | |
make html |