Skip to content

Commit 2bdd717

Browse files
committed
Add GitHub actions config
1 parent 65f7174 commit 2bdd717

File tree

3 files changed

+54
-30
lines changed

3 files changed

+54
-30
lines changed

.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: [pull_request]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-18.04
9+
10+
strategy:
11+
matrix:
12+
python: [3.6, 3.7, 3.8]
13+
django: [2.2, 3.0, 3.1]
14+
database_url:
15+
- postgres://runner:password@localhost/project
16+
- mysql://runner:password@localhost/project
17+
18+
services:
19+
postgres:
20+
image: postgres:11
21+
ports:
22+
- 5432:5432
23+
env:
24+
POSTGRES_DB: project
25+
POSTGRES_USER: runner
26+
POSTGRES_PASSWORD: password
27+
28+
mysql:
29+
image: mysql:5.6
30+
ports:
31+
- 3306:3306
32+
env:
33+
MYSQL_DATABASE: project
34+
MYSQL_USER: runner
35+
MYSQL_PASSWORD: password
36+
37+
env:
38+
DATABASE_URL: ${{ matrix.python }}
39+
40+
steps:
41+
- uses: actions/checkout@v2
42+
- name: Set up Python ${{ matrix.python }}
43+
uses: actions/setup-python@v2
44+
with:
45+
python-version: ${{ matrix.python }}
46+
- name: Install dependencies
47+
run: pip install -r test-requirements.txt
48+
- name: Install Django
49+
run: pip install -U django==${{ matrix.django }}
50+
- name: Run tests
51+
run: python manage.py test
52+
- name: Run black
53+
run: black --check django_dbq

.travis.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

test-requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ freezegun==0.3.12
44
mock==3.0.5
55
dj-database-url==0.5.0
66
psycopg2==2.8.4
7+
black==19.10b0

0 commit comments

Comments
 (0)