Skip to content

feat: add django ci #10

feat: add django ci

feat: add django ci #10

Workflow file for this run

name: Django CI
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
test:
runs-on: ubuntu-latest
services:
mysql:
image: mysql:8.0
env:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: test_db
MYSQL_USER: test_user
MYSQL_PASSWORD: test_pass
options: >-
--health-cmd "mysqladmin ping -h localhost -uroot -proot"
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
DB_NAME: test_db
DB_USER: test_user
DB_PASSWORD: test_pass
DB_HOST: localhost
DB_PORT: 3306
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: 3.13
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install mysqlclient
- name: Migrate Database
run: |
python manage.py migrate
- name: Run Tests
run: |
python manage.py test