Skip to content

Commit

Permalink
Merge pull request #186 from level12/mssql-ci-updates
Browse files Browse the repository at this point in the history
Mssql CI updates
  • Loading branch information
guruofgentoo committed Oct 25, 2022
2 parents edde099 + 3d3003b commit c8e4b47
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .circleci/config.yml
Expand Up @@ -11,6 +11,11 @@ jobs:
POSTGRES_HOST_AUTH_METHOD: trust
POSTGRES_DB: keg_tests
PGPORT: 54321
- image: mcr.microsoft.com/mssql/server
environment:
ACCEPT_EULA: Y
MSSQL_SA_PASSWORD: "Password12!"
MSSQL_TCP_PORT: 14331
steps:
- checkout

Expand Down
12 changes: 10 additions & 2 deletions docker-compose.yaml
Expand Up @@ -11,13 +11,21 @@
# - `docker stop $(docker ps -aq)`: stop all running containers
# - `docker rm $(docker ps -a -q)`: remove all stopped containers

version: '2'
version: '2.1'
services:
keg-mssql:
image: mcr.microsoft.com/mssql/server
container_name: keg-mssql
ports:
- '${KEG_LIB_MSSQL_IP:-127.0.0.1}:${KEG_LIB_MSSQL_PORT:-14331}:1433'
environment:
ACCEPT_EULA: Y
MSSQL_SA_PASSWORD: "Password12!"
keg-pg:
image: postgres:13-alpine
container_name: keg-pg
ports:
- '127.0.0.1:54321:5432'
- '${KEG_LIB_POSTGRES_IP:-127.0.0.1}:${KEG_LIB_POSTGRES_PORT:-54321}:5432'
environment:
# Ok for local dev, potentially UNSAFE in other applications. Don't blindly copy & paste
# without considering implications.
Expand Down
2 changes: 2 additions & 0 deletions keg_apps/db/config.py
Expand Up @@ -22,5 +22,7 @@ class TestProfile(object):
# This string will connect to the postgresql DB setup in docker-compose.yaml and
# work in CircleCI.
'postgres': 'postgresql://postgres@127.0.0.1:54321/postgres',
'mssql': 'mssql+pyodbc_mssql://sa:Password12!@127.0.0.1:14331/tempdb'
'?driver=ODBC+Driver+17+for+SQL+Server',
'sqlite2': 'sqlite:///'
}
3 changes: 2 additions & 1 deletion setup.py
Expand Up @@ -48,7 +48,8 @@
'tests': [
'flask-webtest',
'flask-wtf',
"sqlalchemy_pyodbc_mssql; sys_platform == 'win32'",
'sqlalchemy_pyodbc_mssql',
'pyodbc==4.0.34',
'pytest',
'pytest-cov',
'python-dotenv',
Expand Down
40 changes: 40 additions & 0 deletions stable-requirements.txt
@@ -0,0 +1,40 @@
appdirs==1.4.4
attrs==22.1.0
beautifulsoup4==4.11.1
BlazeUtils==0.6.5
blinker==1.5
click==8.1.3
coverage==6.5.0
Flask==2.2.2
Flask-SQLAlchemy==3.0.2
Flask-WebTest==0.0.9
Flask-WTF==1.0.1
greenlet==1.1.3.post0
importlib-metadata==5.0.0
iniconfig==1.1.1
itsdangerous==2.1.2
Jinja2==3.1.2
MarkupSafe==2.1.1
mock==4.0.3
packaging==21.3
pluggy==1.0.0
psycopg2-binary==2.9.4
py==1.11.0
pyodbc==4.0.34
pyparsing==3.0.9
pytest==7.1.3
pytest-cov==4.0.0
python-dotenv==0.21.0
python-json-logger==2.0.4
six==1.16.0
soupsieve==2.3.2.post1
SQLAlchemy==1.4.42
sqlalchemy-pyodbc-mssql==0.1.1
tomli==2.0.1
waitress==2.1.2
WebOb==1.8.7
WebTest==3.0.0
Werkzeug==2.2.2
wrapt==1.14.1
WTForms==3.0.1
zipp==3.10.0
3 changes: 2 additions & 1 deletion tox.ini
@@ -1,5 +1,5 @@
[tox]
envlist = py{37,38,39},py37-{lowest,i18n},py39-{lowest,i18n},project,docs,i18n
envlist = py{37,38,39}-{base,stable},py37-{lowest,i18n},py39-{lowest,i18n},project,docs,i18n


[testenv]
Expand All @@ -17,6 +17,7 @@ recreate=True
commands =
pip --version
lowest: pip install flask<2 markupsafe~=2.0.0
stable: pip install --progress-bar off -r ./stable-requirements.txt
pip install --progress-bar off .[tests]
i18n: pip install --progress-bar off .[i18n]
# Output installed versions to compare with previous test runs in case a dependency's change
Expand Down

0 comments on commit c8e4b47

Please sign in to comment.