support Django 4.1 and 4.2, Django mongoengine 0.5.6, django rest fra… #245
This file contains hidden or 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: Test | |
# Enable Buildkit and let compose use it to speed up image building | |
env: | |
DOCKER_BUILDKIT: 1 | |
COMPOSE_DOCKER_CLI_BUILD: 1 | |
on: | |
pull_request: | |
branches: [ "master", "main" ] | |
paths-ignore: [ "docs/**" ] | |
push: | |
branches: [ "master", "main" ] | |
paths-ignore: [ "docs/**" ] | |
jobs: | |
pytest: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
max-parallel: 5 | |
matrix: | |
python-version: ['3.8', '3.9', '3.10', '3.11'] | |
django-version: ['4.1', '4.2'] | |
drf-version: ['3.14', '3.15'] | |
# mongoengine-version: ['0.22', '0.23', '0.24'] | |
django-mongoengine-version: ['0.5.6'] | |
pyjwt-version: ['1.7.1', '2'] | |
steps: | |
- name: Checkout Code Repository | |
uses: actions/checkout@v3 | |
- name: Setup MongoDB | |
run: | | |
docker pull mongo | |
docker run -d -p 27017:27017 -e MONGO_INITDB_ROOT_USERNAME=admin -e MONGO_INITDB_ROOT_PASSWORD=SimpleJWT_MongoEngine mongo | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/[email protected] | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Get pip cache dir | |
id: pip-cache | |
run: | | |
echo "CACHE_DIR=$(pip cache dir)" >> $GITHUB_OUTPUT | |
- name: Cache | |
uses: actions/[email protected] | |
with: | |
path: ${{ steps.pip-cache.outputs.CACHE_DIR }} | |
key: | |
${{ matrix.python-version }}-v1-${{ hashFiles('**/setup.py') }} | |
restore-keys: | | |
${{ matrix.python-version }}-v1- | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install --upgrade tox tox-gh-actions | |
- name: Tox tests | |
run: tox -v | |
env: | |
DJANGO: ${{ matrix.django-version }} | |
DRF: ${{ matrix.drf-version }} | |
# ME: ${{ matrix.mongoengine-version }} | |
DJME: ${{ matrix.django-mongoengine-version }} | |
DRFSIMPLEJWT: ${{ matrix.drf-simplejwt-version }} | |
PYJWT: ${{ matrix.pyjwt-version }} |