Skip to content

Commit b6b9f84

Browse files
author
Jean Cochrane (Lead developer, DataMade)
committed
Update test deps and configure GitHub Actions for CI
1 parent 7cb57c0 commit b6b9f84

File tree

2 files changed

+41
-1
lines changed

2 files changed

+41
-1
lines changed

.github/workflows/main.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
12+
test:
13+
name: Test against different Python versions
14+
runs-on: ubuntu-latest
15+
strategy:
16+
matrix:
17+
python: [3.5.x, 3.6.x, 3.7.x]
18+
sqlalchemy: [1.2.*, 1.3.*]
19+
services:
20+
postgres:
21+
image: postgres:11
22+
ports:
23+
- 5432:5432
24+
# needed because the postgres container does not provide a healthcheck
25+
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
26+
steps:
27+
- uses: actions/checkout@v1
28+
- uses: actions/setup-python@v1
29+
with:
30+
python-version: ${{ matrix.python }}
31+
architecture: x64
32+
- name: Install packages and run tests
33+
run: |
34+
pip install --upgrade pip
35+
pip install -e .[tests]
36+
pip install --upgrade sqlalchemy=="${SQLALCHEMY_VERSION}"
37+
pytest
38+
env:
39+
TEST_DATABASE_URL: postgresql://postgres@localhost:5432/pytest_test
40+
SQLALCHEMY_VERSION: ${{ matrix.sqlalchemy }}

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def readme():
2121
'SQLAlchemy>=1.2.2',
2222
'Flask-SQLAlchemy>=2.3',
2323
'packaging>=14.1'],
24-
extras_require={'tests': ['pytest-postgresql']},
24+
extras_require={'tests': ['pytest-postgresql<2.0', 'psycopg2-binary']},
2525
classifiers=[
2626
'Development Status :: 4 - Beta',
2727
'Environment :: Plugins',

0 commit comments

Comments
 (0)