Skip to content

Commit bc9db45

Browse files
committed
CI on Github Actions
1 parent 36a815a commit bc9db45

1 file changed

Lines changed: 53 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
11+
services:
12+
mariadb:
13+
image: mariadb:10.7
14+
env:
15+
MARIADB_ROOT_PASSWORD: root
16+
MARIADB_DATABASE: gregoplus
17+
ports:
18+
- 3306:3306
19+
options: >-
20+
--health-cmd="mysqladmin ping -h 127.0.0.1 -uroot -proot"
21+
--health-interval=10s
22+
--health-timeout=5s
23+
--health-retries=5
24+
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v4
28+
29+
- name: Set up Python
30+
uses: actions/setup-python@v5
31+
with:
32+
python-version: '3.13'
33+
cache: 'pip'
34+
35+
- name: Install system dependencies
36+
run: |
37+
sudo apt-get update
38+
sudo apt-get install -y build-essential default-libmysqlclient-dev pkg-config
39+
40+
- name: Install Python dependencies
41+
run: |
42+
python -m pip install --upgrade pip
43+
pip install -r requirements.txt
44+
45+
- name: Run tests
46+
env:
47+
SECRET_KEY: ci_secret_key
48+
DEBUG: 'true'
49+
DB_NAME: gregoplus
50+
DB_USER: root
51+
DB_PASSWORD: root
52+
DB_HOST: 127.0.0.1
53+
run: python manage.py test

0 commit comments

Comments
 (0)