Skip to content

Commit b92f7ab

Browse files
Merge remote-tracking branch 'origin/main'
2 parents 97e7335 + e282f08 commit b92f7ab

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.github/workflows/django.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Django CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ubuntu-latest
13+
14+
services:
15+
postgres:
16+
image: postgres:12
17+
env:
18+
POSTGRES_USER: daguser
19+
POSTGRES_PASSWORD: daguser
20+
POSTGRES_DB: dagdb
21+
ports: ['5432:5432']
22+
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
23+
24+
strategy:
25+
max-parallel: 4
26+
matrix:
27+
python-version: [3.7, 3.8, 3.9]
28+
29+
steps:
30+
- uses: actions/checkout@v2
31+
- name: Set up Python ${{ matrix.python-version }}
32+
uses: actions/setup-python@v2
33+
with:
34+
python-version: ${{ matrix.python-version }}
35+
- name: Install Dependencies
36+
run: |
37+
python -m pip install --upgrade pip
38+
pip install -r requirements-dev.txt
39+
- name: Run Migrations
40+
run: |
41+
python manage.py migrate
42+
- name: Run Tests
43+
run: |
44+
python manage.py test

0 commit comments

Comments
 (0)