cookiecutter-django/{{cookiecutter.project_slug}}/.travis.yml
Jelmer 42c30dafcb
Upgrade Python to version 3.11 (Faster CPython) (#4256)
* Upgrade Python to version 3.11 (Faster CPython)

* Update pyupgrade config for Python 3.11

* Update tox env to Python 3.11

* Update to latest Python 3.11.3

* Add a note about lack of support in PythonAnywhere

* Rephrase note

* Fix casing

---------

Co-authored-by: Bruno Alla <alla.brunoo@gmail.com>
Co-authored-by: Bruno Alla <browniebroke@users.noreply.github.com>
2023-04-15 11:42:33 +01:00

46 lines
1.5 KiB
YAML

dist: focal
language: python
python:
- "3.11"
services:
- {% if cookiecutter.use_docker == 'y' %}docker{% else %}postgresql{% endif %}
jobs:
include:
- name: "Linter"
before_script:
- pip install -q flake8
script:
- "flake8"
- name: "Django Test"
{%- if cookiecutter.use_docker == 'y' %}
before_script:
- docker-compose -v
- docker -v
- docker-compose -f local.yml build
# Ensure celerybeat does not crash due to non-existent tables
- docker-compose -f local.yml run --rm django python manage.py migrate
- docker-compose -f local.yml up -d
script:
- "docker-compose -f local.yml run django pytest"
after_failure:
- docker-compose -f local.yml logs
{%- else %}
before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq build-essential gettext python-dev zlib1g-dev libpq-dev xvfb
- sudo apt-get install -qq libjpeg8-dev libfreetype6-dev libwebp-dev
- sudo apt-get install -qq graphviz-dev python-setuptools python3-dev python-virtualenv python-pip
- sudo apt-get install -qq firefox automake libtool libreadline6 libreadline6-dev libreadline-dev
- sudo apt-get install -qq libsqlite3-dev libxml2 libxml2-dev libssl-dev libbz2-dev wget curl llvm
language: python
python:
- "3.11"
install:
- pip install -r requirements/local.txt
script:
- "pytest"
{%- endif %}