blob: 5e32d2a17fd24df13c14d007c0a5ca6296c985f7 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
stages:
- lint
- test
variables:
POSTGRES_USER: 'pyblackbird_cc'
POSTGRES_PASSWORD: ''
POSTGRES_DB: 'test_pyblackbird_cc'
POSTGRES_HOST_AUTH_METHOD: trust
CELERY_BROKER_URL: 'redis://redis:6379/0'
precommit:
stage: lint
image: python:3.12
variables:
PRE_COMMIT_HOME: ${CI_PROJECT_DIR}/.cache/pre-commit
cache:
paths:
- ${PRE_COMMIT_HOME}
before_script:
- pip install -q pre-commit
script:
- pre-commit run --show-diff-on-failure --color=always --all-files
pytest:
stage: test
image: docker:25.0
tags:
- docker
services:
- docker:dind
before_script:
- docker compose -f local.yml build
- docker compose -f docs.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
|