Skip to content

Commit e7047d1

Browse files
authored
Merge pull request #34 from jayaddison/github/update-postgres
GitHub Actions: update postgres service definition
2 parents 3a550b6 + 2305db1 commit e7047d1

File tree

6 files changed

+17
-9
lines changed

6 files changed

+17
-9
lines changed

.github/workflows/main.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@ jobs:
1414
runs-on: ubuntu-latest
1515
strategy:
1616
matrix:
17-
python: [3.5.x, 3.6.x, 3.7.x]
17+
python: [3.6.x, 3.7.x]
1818
sqlalchemy: [1.2.*, 1.3.*]
1919
services:
2020
postgres:
2121
image: postgres:11
22+
env:
23+
POSTGRES_PASSWORD: postgres
2224
ports:
2325
- 5432:5432
2426
# needed because the postgres container does not provide a healthcheck
@@ -36,5 +38,5 @@ jobs:
3638
pip install --upgrade sqlalchemy=="${SQLALCHEMY_VERSION}"
3739
pytest
3840
env:
39-
TEST_DATABASE_URL: postgresql://postgres@localhost:5432/pytest_test
41+
TEST_DATABASE_URL: postgresql://postgres:postgres@localhost:5432/pytest_test
4042
SQLALCHEMY_VERSION: ${{ matrix.sqlalchemy }}

.travis.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ branches:
66
language: python
77
python:
88
- '3.6'
9-
- '3.5'
10-
- '3.4'
119

1210
env:
1311
global:

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [Unreleased]
9+
10+
### Removed
11+
12+
- Drop support for Python versions prior to 3.6
13+
814
## [1.0.2](https://github.com/jeancochrane/pytest-flask-sqlalchemy/releases/tag/v1.0.2) (2019-04-03)
915

1016
### Changed

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<2.0', 'psycopg2-binary']},
24+
extras_require={'tests': ['pytest-postgresql>=2.4.0', 'psycopg2-binary']},
2525
classifiers=[
2626
'Development Status :: 4 - Beta',
2727
'Environment :: Plugins',

tests/_conftest.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,14 @@ def database(request):
3030
pg_host = DB_OPTS.get("host")
3131
pg_port = DB_OPTS.get("port")
3232
pg_user = DB_OPTS.get("username")
33+
pg_pass = DB_OPTS.get("password")
3334
pg_db = DB_OPTS["database"]
3435

35-
init_postgresql_database(pg_user, pg_host, pg_port, pg_db)
36+
init_postgresql_database(pg_user, pg_host, pg_port, pg_db, pg_pass)
3637

3738
@request.addfinalizer
3839
def drop_database():
39-
drop_postgresql_database(pg_user, pg_host, pg_port, pg_db, 9.6)
40+
drop_postgresql_database(pg_user, pg_host, pg_port, pg_db, 9.6, pg_pass)
4041

4142

4243
@pytest.fixture(scope='session')

tests/test_configs.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,14 @@ def database(request):
9999
pg_host = DB_OPTS.get("host")
100100
pg_port = DB_OPTS.get("port")
101101
pg_user = DB_OPTS.get("username")
102+
pg_pass = DB_OPTS.get("password")
102103
pg_db = DB_OPTS["database"]
103104
104-
init_postgresql_database(pg_user, pg_host, pg_port, pg_db)
105+
init_postgresql_database(pg_user, pg_host, pg_port, pg_db, pg_pass)
105106
106107
@request.addfinalizer
107108
def drop_database():
108-
drop_postgresql_database(pg_user, pg_host, pg_port, pg_db, 9.6)
109+
drop_postgresql_database(pg_user, pg_host, pg_port, pg_db, 9.6, pg_pass)
109110
110111
111112
@pytest.fixture(scope='session')

0 commit comments

Comments
 (0)