Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 72 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: CI Pipeline

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build-test-lint:
runs-on: ubuntu-latest

services:
postgres:
image: postgres:16
env:
POSTGRES_DB: taskflow
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
options: >-
--health-cmd="pg_isready"
--health-interval=10s
--health-timeout=5s
--health-retries=5

rabbitmq:
image: rabbitmq:3.12-management
ports:
- 5672:5672
- 15672:15672

env:
DEBUG: False
SECRET_KEY: dummy-key
DJANGO_ALLOWED_HOSTS: localhost
POSTGRES_DB: taskflow
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_HOST: localhost
POSTGRES_PORT: 5432
CELERY_BROKER_URL: amqp://guest:guest@localhost:5672//

steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install dependencies
run: |
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt

- name: Run migrations
run: |
source venv/bin/activate
python manage.py migrate

- name: Run tests
run: |
source venv/bin/activate
pytest --disable-warnings

- name: Run Ruff Linter
run: |
source venv/bin/activate
ruff check .