Skip to content

Commit caec32f

Browse files
authored
Merge pull request #40 from dabapps/github-actions
Add GitHub actions config
2 parents 65f7174 + c503c30 commit caec32f

File tree

5 files changed

+50
-32
lines changed

5 files changed

+50
-32
lines changed

.github/workflows/ci.yml

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
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]
14+
database_url:
15+
- postgres://runner:password@localhost/project
16+
- mysql://root:[email protected]/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+
env:
29+
DATABASE_URL: ${{ matrix.database_url }}
30+
31+
steps:
32+
- name: Start MySQL
33+
run: sudo systemctl start mysql.service
34+
- uses: actions/checkout@v2
35+
- name: Set up Python ${{ matrix.python }}
36+
uses: actions/setup-python@v2
37+
with:
38+
python-version: ${{ matrix.python }}
39+
- name: Install dependencies
40+
run: pip install -r test-requirements.txt
41+
- name: Install Django
42+
run: pip install -U django==${{ matrix.django }}
43+
- name: Run tests
44+
run: python manage.py test
45+
- name: Run black
46+
run: black --check django_dbq

.travis.yml

-30
This file was deleted.

requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
django-model-utils==2.3.1
22
django-uuidfield==0.5.0
33
jsonfield==1.0.3
4-
Django>=1.8
4+
Django>=2.2<3.0
55
simplesignals==0.3.0

setup.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
license = "BSD"
1818
install_requires = [
1919
"jsonfield==2.0.2",
20-
"Django>=1.7",
20+
"Django>=2.2",
2121
"simplesignals==0.3.0",
2222
]
2323

@@ -84,4 +84,5 @@ def get_package_data(package):
8484
package_data=get_package_data(package),
8585
install_requires=install_requires,
8686
classifiers=[],
87+
python_requires=">=3.6"
8788
)

test-requirements.txt

+1
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)