Skip to content

Commit 85a0102

Browse files
authored
GitHub actions continued (getslash#644)
* get tests running * add a redis container * add pytest durations * update gitignore * pin back sqlalchemy and alembic test_searching.py:test_subject_search test_searching.py:test_computed_fields failed with sqlalchemy>=1.3 alembic was pinned back so pipenv could resolve dependencies * try to improve performance of postgres container https://github.community/t/insight-into-vm-performance/16199/8 * disable fsync https://pythonspeed.com/articles/faster-db-tests/ * try again * try a different postgres container https://stackoverflow.com/a/65444387 * update health check * fix envvars * remove durations from unit tests
1 parent b24d206 commit 85a0102

File tree

5 files changed

+368
-446
lines changed

5 files changed

+368
-446
lines changed

.github/workflows/ci.yml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,27 @@ jobs:
44
test:
55
runs-on: ubuntu-latest
66
services:
7+
redis:
8+
image: redis:latest
9+
ports:
10+
- 6379:6379
711
postgres:
8-
image: postgres:latest
12+
image: bitnami/postgresql:latest
913
env:
10-
POSTGRES_DB: backslash
11-
POSTGRES_PASSWORD: backslash
12-
POSTGRES_USER: backslash
14+
POSTGRESQL_DATABASE: backslash
15+
POSTGRESQL_PASSWORD: backslash
16+
POSTGRESQL_USERNAME: backslash
17+
POSTGRESQL_FSYNC: "off"
1318
ports:
1419
- 5432:5432
20+
options: >-
21+
--mount type=tmpfs,destination=/var/lib/postgresql/data
22+
--health-cmd "pg_isready -d backslash -U backslash -p 5432"
23+
--health-interval 10s
24+
--health-timeout 5s
25+
--health-retries 5
26+
27+
1528
steps:
1629
- name: Install dependencies
1730
run: |
@@ -26,3 +39,5 @@ jobs:
2639
uses: actions/checkout@v2
2740
- run: pipenv install -d
2841
- run: pipenv run manage db upgrade
42+
- run: pipenv run manage unittest
43+
- run: pipenv run manage

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,8 @@ webapp/tmp
6161
tests/.cache
6262
flycheck_*
6363
/.pytest_cache
64+
65+
# vscode
66+
.vscode
67+
# virtualenv
68+
.venv

Pipfile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@ url = "https://pypi.org/simple"
44
verify_ssl = true
55

66
[packages]
7-
Flask = ">=0.10.1"
7+
Flask = "<2.0"
88
Flask-Login = ">=0.3.0,<0.4.0"
99
Flask-Mail = "*"
1010
Flask-Migrate = ">=1.3.0"
1111
Flask-RESTful = "*"
1212
Flask-SQLAlchemy = ">=2.2"
13-
Flask-Security = ">=1.7.5"
14-
SQLAlchemy = ">=1.1.0"
13+
Flask-Security = ">=3.0.0"
14+
SQLAlchemy = ">=1.1.0,<1.3"
1515
URLObject = "*"
1616
Werkzeug = ">=0.10.2"
17-
alembic = ">=0.7.3"
18-
celery = {extras = ["redis"], version = "*"}
17+
alembic = ">=0.7.3,<1.3"
18+
celery = {extras = ["redis"], version = "<5.0.0"}
1919
click = "<9"
2020
dateparser = "*"
2121
"dogpile.cache" = "*"
@@ -26,7 +26,7 @@ flux = ">=1.3.0"
2626
google-api-python-client = "*"
2727
gunicorn = "*"
2828
inflect = "*"
29-
itsdangerous = "*"
29+
itsdangerous = "<2.0"
3030
logbook = "*"
3131
munch = "*"
3232
"oauth2client" = "*"

0 commit comments

Comments
 (0)