Skip to content

Commit

Permalink
Merge pull request #40 from dabapps/github-actions
Browse files Browse the repository at this point in the history
Add GitHub actions config
  • Loading branch information
j4mie authored Apr 5, 2021
2 parents 65f7174 + c503c30 commit caec32f
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 32 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: CI

on: [pull_request]

jobs:
build:

runs-on: ubuntu-18.04

strategy:
matrix:
python: [3.6, 3.7, 3.8]
django: [2.2]
database_url:
- postgres://runner:password@localhost/project
- mysql://root:[email protected]/project

services:
postgres:
image: postgres:11
ports:
- 5432:5432
env:
POSTGRES_DB: project
POSTGRES_USER: runner
POSTGRES_PASSWORD: password

env:
DATABASE_URL: ${{ matrix.database_url }}

steps:
- name: Start MySQL
run: sudo systemctl start mysql.service
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: pip install -r test-requirements.txt
- name: Install Django
run: pip install -U django==${{ matrix.django }}
- name: Run tests
run: python manage.py test
- name: Run black
run: black --check django_dbq
30 changes: 0 additions & 30 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
django-model-utils==2.3.1
django-uuidfield==0.5.0
jsonfield==1.0.3
Django>=1.8
Django>=2.2<3.0
simplesignals==0.3.0
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
license = "BSD"
install_requires = [
"jsonfield==2.0.2",
"Django>=1.7",
"Django>=2.2",
"simplesignals==0.3.0",
]

Expand Down Expand Up @@ -84,4 +84,5 @@ def get_package_data(package):
package_data=get_package_data(package),
install_requires=install_requires,
classifiers=[],
python_requires=">=3.6"
)
1 change: 1 addition & 0 deletions test-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ freezegun==0.3.12
mock==3.0.5
dj-database-url==0.5.0
psycopg2==2.8.4
black==19.10b0

0 comments on commit caec32f

Please sign in to comment.