Skip to content

Remove usages of deprecated datetime.utcnow() and datetime.utcfromtim… #249

Remove usages of deprecated datetime.utcnow() and datetime.utcfromtim…

Remove usages of deprecated datetime.utcnow() and datetime.utcfromtim… #249

Workflow file for this run

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@v4
- 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/setup-python@v5
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/cache@v4
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 }}