mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-25 11:04:04 +03:00
10c85ce3d6
* Renamed local.yml to docker-compose.local.yml * Renamed production.yml to docker-compose.production.yml * Rename docs.yml to docker-compose.docs.yml * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Bruno Alla <alla.brunoo@gmail.com>
47 lines
1.6 KiB
YAML
47 lines
1.6 KiB
YAML
dist: focal
|
|
|
|
language: python
|
|
python:
|
|
- "3.12"
|
|
|
|
services:
|
|
- {% if cookiecutter.use_docker == 'y' %}docker{% else %}postgresql{% endif %}
|
|
jobs:
|
|
include:
|
|
- name: "Linter"
|
|
before_script:
|
|
- pip install -q ruff
|
|
script:
|
|
- ruff check .
|
|
|
|
- name: "Django Test"
|
|
{%- if cookiecutter.use_docker == 'y' %}
|
|
before_script:
|
|
- docker compose -v
|
|
- docker -v
|
|
- docker compose -f docker-compose.local.yml build
|
|
- docker compose -f docker-compose.docs.yml build
|
|
# Ensure celerybeat does not crash due to non-existent tables
|
|
- docker compose -f docker-compose.local.yml run --rm django python manage.py migrate
|
|
- docker compose -f docker-compose.local.yml up -d
|
|
script:
|
|
- docker compose -f docker-compose.local.yml run django pytest
|
|
after_failure:
|
|
- docker compose -f docker-compose.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.12"
|
|
install:
|
|
- pip install -r requirements/local.txt
|
|
script:
|
|
- pytest
|
|
{%- endif %}
|