-
Notifications
You must be signed in to change notification settings - Fork 3
72 lines (72 loc) · 2.18 KB
/
ci.yml
File metadata and controls
72 lines (72 loc) · 2.18 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
name: ci
on:
pull_request:
push:
branches:
- main
schedule:
- cron: "0 0 * * *"
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgis/postgis:13-3.2
env:
POSTGRES_DB: django
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
rabbitmq:
image: rabbitmq:3.9.13-management
ports:
- 5672:5672
minio:
# This image does not require any command arguments (which GitHub Actions don't support)
image: bitnami/minio:2022.3.5-debian-10-r3
env:
MINIO_ROOT_USER: minioAccessKey
MINIO_ROOT_PASSWORD: minioSecretKey
ports:
- 9000:9000
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: Install ffmpeg
run: |
sudo apt update
sudo apt-get install --no-install-recommends --yes ffmpeg
- name: Install tox and codecov
run: |
pip install --upgrade pip
pip install tox codecov
- name: Run linting
run: |
tox -e lint
env:
DJANGO_DATABASE_URL: postgres://postgres:postgres@localhost:5432/django
DJANGO_MINIO_STORAGE_ENDPOINT: localhost:9000
DJANGO_MINIO_STORAGE_ACCESS_KEY: minioAccessKey
DJANGO_MINIO_STORAGE_SECRET_KEY: minioSecretKey
- name: Run check migrations
run: |
tox -e check-migrations
env:
DJANGO_DATABASE_URL: postgres://postgres:postgres@localhost:5432/django
DJANGO_MINIO_STORAGE_ENDPOINT: localhost:9000
DJANGO_MINIO_STORAGE_ACCESS_KEY: minioAccessKey
DJANGO_MINIO_STORAGE_SECRET_KEY: minioSecretKey
# - name: Run tests
# run: |
# tox -e test
# env:
# DJANGO_DATABASE_URL: postgres://postgres:postgres@localhost:5432/django
# DJANGO_MINIO_STORAGE_ENDPOINT: localhost:9000
# DJANGO_MINIO_STORAGE_ACCESS_KEY: minioAccessKey
# DJANGO_MINIO_STORAGE_SECRET_KEY: minioSecretKey
# - name: Upload Coverage
# run: |
# codecov