initial commit of MongoDB backend #2
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: | |
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.8 | |
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: Checkout Django | |
uses: actions/checkout@v4 | |
with: | |
repository: 'timgraham/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: | | |
pip3 install -U pip | |
cd django_repo/tests/ | |
pip3 install -e .. | |
pip3 install -r requirements/py3.txt | |
- name: install the django-snowflake backend | |
run: pip3 install . | |
- 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.tests.ModelLookupTest.test_all_lookup | |
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' | |
# Build docs on lowest supported Python for furo | |
python-version: '3.8' | |
- name: Install dependencies | |
run: | | |
pip install -U pip | |
pip install -e ".[docs]" | |
- name: Build docs | |
run: | | |
cd docs | |
make html |