Skip to content

CI on Github Actions #2

CI on Github Actions

CI on Github Actions #2

Workflow file for this run

name: CI
on:
push:
pull_request:
jobs:
test:
runs-on: ubuntu-latest
services:
mariadb:
image: mariadb:10.7
env:
MARIADB_ROOT_PASSWORD: root
MARIADB_DATABASE: gregoplus
ports:
- 3306:3306
options: >-
--health-cmd="mysqladmin ping -h 127.0.0.1 -uroot -proot"
--health-interval=10s
--health-timeout=5s
--health-retries=5
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
cache: 'pip'
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential default-libmysqlclient-dev pkg-config
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run tests
env:
SECRET_KEY: ci_secret_key
DEBUG: 'true'
DB_NAME: gregoplus
DB_USER: root
DB_PASSWORD: root
DB_HOST: 127.0.0.1
run: python manage.py test