-
Notifications
You must be signed in to change notification settings - Fork 19
74 lines (74 loc) · 2.25 KB
/
backend-ci.yml
File metadata and controls
74 lines (74 loc) · 2.25 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: CI for backend
on:
pull_request:
paths-ignore:
- "web/**"
push:
branches:
- master
paths-ignore:
- "web/**"
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-22.04
services:
postgres:
image: postgres:latest
env:
POSTGRES_DB: django
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd "pg_isready --username postgres"
--health-start-period 30s
--health-start-interval 2s
ports:
- 5432:5432
rabbitmq:
image: rabbitmq:management-alpine
options: >-
--health-cmd "rabbitmq-diagnostics ping"
--health-start-period 30s
--health-start-interval 2s
ports:
- 5672:5672
minio:
# This image does not require any command arguments (which GitHub Actions don't support)
image: bitnamilegacy/minio:latest
env:
MINIO_ROOT_USER: minioAccessKey
MINIO_ROOT_PASSWORD: minioSecretKey
options: >-
--health-cmd "mc ready local"
--health-timeout 1s
--health-start-period 30s
--health-start-interval 2s
ports:
- 9000:9000
env:
DJANGO_DATABASE_URL: postgres://postgres:postgres@localhost:5432/django
DJANGO_CELERY_BROKER_URL: amqp://localhost:5672/
DJANGO_MINIO_STORAGE_URL: http://minioAccessKey:minioSecretKey@localhost:9000/django-storage-testing
DJANGO_DANDI_WEB_APP_URL: http://localhost:8085
DJANGO_DANDI_API_URL: http://localhost:8000
DJANGO_DANDI_JUPYTERHUB_URL: https://hub.dandiarchive.org/
DJANGO_DANDI_INSTANCE_NAME: DANDI
DJANGO_DANDI_INSTANCE_IDENTIFIER: "RRID:SCR_017571"
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0 # fetch history for all branches and tags
- name: Install uv
uses: astral-sh/setup-uv@v7
- name: Run pre-commit
run: |
uv run pre-commit run --all-files
- name: Run Python tests
run: |
uv run tox
- name: Verify gunicorn config
run: |
uv run gunicorn --config gunicorn.conf.py --check-config dandiapi.wsgi
env:
DJANGO_SETTINGS_MODULE: dandiapi.settings.development