Skip to content

Commit 3094560

Browse files
authored
Added: django CI action
1 parent f187491 commit 3094560

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/django.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Django CI
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
env:
9+
DJANGO_DEBUG: "False"
10+
DJANGO_LIVE: "0"
11+
DJANGO_SECRET_KEY: "bad_key"
12+
DJANGO_ALLOWED_HOSTS: "*"
13+
DJANGO_ADMIN_URL: "admin"
14+
DJANGO_EMAIL_HOST_USER: "email"
15+
DJANGO_EMAIL_HOST_PASSWORD: "your_password"
16+
17+
jobs:
18+
build:
19+
20+
runs-on: ubuntu-latest
21+
strategy:
22+
max-parallel: 4
23+
matrix:
24+
python-version: ["3.10", "3.11"]
25+
26+
steps:
27+
- uses: actions/checkout@v4
28+
- name: Set up Python ${{ matrix.python-version }}
29+
uses: actions/setup-python@v3
30+
with:
31+
python-version: ${{ matrix.python-version }}
32+
- name: Install Dependencies
33+
run: |
34+
python -m pip install --upgrade pip
35+
pip install -r src/requirements.txt
36+
- name: Run Tests
37+
run: |
38+
python src/manage.py test

0 commit comments

Comments
 (0)