File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : CI Pipeline
2+
3+ on :
4+ push :
5+ branches : [ main ]
6+ pull_request :
7+ branches : [ main ]
8+
9+ jobs :
10+ build-test-lint :
11+ runs-on : ubuntu-latest
12+
13+ services :
14+ postgres :
15+ image : postgres:16
16+ env :
17+ POSTGRES_DB : taskflow
18+ POSTGRES_USER : postgres
19+ POSTGRES_PASSWORD : postgres
20+ ports :
21+ - 5432:5432
22+ options : >-
23+ --health-cmd="pg_isready"
24+ --health-interval=10s
25+ --health-timeout=5s
26+ --health-retries=5
27+
28+ rabbitmq :
29+ image : rabbitmq:3.12-management
30+ ports :
31+ - 5672:5672
32+ - 15672:15672
33+
34+ env :
35+ DEBUG : False
36+ SECRET_KEY : dummy-key
37+ DJANGO_ALLOWED_HOSTS : localhost
38+ POSTGRES_DB : taskflow
39+ POSTGRES_USER : postgres
40+ POSTGRES_PASSWORD : postgres
41+ POSTGRES_HOST : localhost
42+ POSTGRES_PORT : 5432
43+ CELERY_BROKER_URL : amqp://guest:guest@localhost:5672//
44+
45+ steps :
46+ - uses : actions/checkout@v4
47+
48+ - name : Set up Python
49+ uses : actions/setup-python@v5
50+ with :
51+ python-version : ' 3.12'
52+
53+ - name : Install dependencies
54+ run : |
55+ python -m venv venv
56+ source venv/bin/activate
57+ pip install -r requirements.txt
58+
59+ - name : Run migrations
60+ run : |
61+ source venv/bin/activate
62+ python manage.py migrate
63+
64+ - name : Run tests
65+ run : |
66+ source venv/bin/activate
67+ pytest --disable-warnings
68+
69+ - name : Run Ruff Linter
70+ run : |
71+ source venv/bin/activate
72+ ruff check .
You can’t perform that action at this time.
0 commit comments