Skip to content

feat: allow GeneralModelConverter to be overridden #1751

feat: allow GeneralModelConverter to be overridden

feat: allow GeneralModelConverter to be overridden #1751

Workflow file for this run

# Python unit tests
name: Python
on:
push:
branches: ['master']
pull_request:
branches: ['master']
jobs:
lint:
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: [3.8]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libldap2-dev libsasl2-dev libssl-dev
pip install --upgrade pip
pip install -r requirements/dev.txt
- name: black
run: black --check setup.py flask_appbuilder
- name: flake8
run: flake8 flask_appbuilder
- name: mypy
run: mypy flask_appbuilder
- name: black
run: black --check tests
- name: flake8
run: flake8 tests
test-postgres:
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
env:
SQLALCHEMY_DATABASE_URI:
postgresql+psycopg2://pguser:[email protected]:15432/app
services:
postgres:
image: postgres:14-alpine
env:
POSTGRES_USER: pguser
POSTGRES_PASSWORD: pguserpassword
POSTGRES_DB: app
ports:
- 15432:5432
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Run openldap
run: |
docker run -d \
-v '${{ github.workspace }}/docker/openldap/ldifs:/ldifs' \
-v '${{ github.workspace }}/docker/openldap/schemas/memberof.ldif:/opt/bitnami/openldap/etc/schema/memberof.ldif' \
-e LDAP_URI=ldap://openldap:1389 \
-e LDAP_BASE=dc=example,dc=org \
-e LDAP_ADMIN_USERNAME=admin \
-e LDAP_ADMIN_PASSWORD=admin_password \
-e LDAP_EXTRA_SCHEMAS=cosine,inetorgperson,nis,memberof \
-p 1389:1389 \
bitnami/openldap:2.6.4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libldap2-dev libsasl2-dev libssl-dev
pip install --upgrade pip
pip install -r requirements/base.txt
pip install -r requirements/tests.txt
pip install -r requirements/extra.txt
- name: Run tests
run: |
nose2 -c setup.cfg -F -v --with-coverage --coverage flask_appbuilder -A '!mongo,!openid' tests
- name: Upload code coverage
run: |
bash <(curl -s https://codecov.io/bash) -cF python
test-mysql:
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: [3.8]
env:
SQLALCHEMY_DATABASE_URI: |
mysql+mysqldb://mysqluser:[email protected]:13306/app?charset=utf8mb4&binary_prefix=true
services:
mysql:
image: mysql:5.7
env:
MYSQL_USER: mysqluser
MYSQL_PASSWORD: mysqluserpassword
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: app
ports:
- 13306:3306
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Run openldap
run: |
docker run -d \
-v '${{ github.workspace }}/docker/openldap/ldifs:/ldifs' \
-v '${{ github.workspace }}/docker/openldap/schemas/memberof.ldif:/opt/bitnami/openldap/etc/schema/memberof.ldif' \
-e LDAP_URI=ldap://openldap:1389 \
-e LDAP_BASE=dc=example,dc=org \
-e LDAP_ADMIN_USERNAME=admin \
-e LDAP_ADMIN_PASSWORD=admin_password \
-e LDAP_EXTRA_SCHEMAS=cosine,inetorgperson,nis,memberof \
-p 1389:1389 \
bitnami/openldap:2.6.4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libldap2-dev libsasl2-dev libssl-dev
pip install --upgrade pip
pip install -r requirements/base.txt
pip install -r requirements/tests.txt
pip install -r requirements/extra.txt
- name: Run tests
run: |
nose2 -c setup.cfg -F -v --with-coverage --coverage flask_appbuilder -A '!mongo,!openid' tests
- name: Upload code coverage
run: |
bash <(curl -s https://codecov.io/bash) -cF python
test-mssql:
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: [3.8]
env:
SQLALCHEMY_DATABASE_URI: |
mssql+pyodbc://sa:Password_123@localhost:11433/master?driver=FreeTDS
services:
mssql:
image: mcr.microsoft.com/mssql/server:2017-CU8-ubuntu
env:
SA_PASSWORD: Password_123
ACCEPT_EULA: Y
ports:
- 11433:1433
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Run openldap
run: |
docker run -d \
-v '${{ github.workspace }}/docker/openldap/ldifs:/ldifs' \
-v '${{ github.workspace }}/docker/openldap/schemas/memberof.ldif:/opt/bitnami/openldap/etc/schema/memberof.ldif' \
-e LDAP_URI=ldap://openldap:1389 \
-e LDAP_BASE=dc=example,dc=org \
-e LDAP_ADMIN_USERNAME=admin \
-e LDAP_ADMIN_PASSWORD=admin_password \
-e LDAP_EXTRA_SCHEMAS=cosine,inetorgperson,nis,memberof \
-p 1389:1389 \
bitnami/openldap:2.6.4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libldap2-dev libsasl2-dev libssl-dev freetds-bin unixodbc-dev tdsodbc
pip install --upgrade pip
pip install -r requirements/base.txt
pip install -r requirements/tests.txt
pip install -r requirements/extra.txt
sudo cp .github/workflows/odbcinst.ini /etc/odbcinst.ini
- name: Run tests
run: |
nose2 -c setup.cfg -F -v --with-coverage --coverage flask_appbuilder -A '!mongo,!openid' tests
- name: Upload code coverage
run: |
bash <(curl -s https://codecov.io/bash) -cF python
test-mongodb:
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: [3.8]
services:
mongo:
image: mongo:4.4.1-bionic
ports:
- 27017:27017
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libldap2-dev libsasl2-dev libssl-dev
pip install --upgrade pip
pip install -r requirements/base.txt
pip install -r requirements/tests.txt
pip install -r requirements/extra.txt
pip install -r requirements/mongodb.txt
- name: Run tests
run: |
nose2 -c setup.cfg -F -v --with-coverage --coverage flask_appbuilder -A 'mongo' tests
- name: Upload code coverage
run: |
bash <(curl -s https://codecov.io/bash) -cF python
test-openid:
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: [3.8]
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libldap2-dev libsasl2-dev libssl-dev
pip install --upgrade pip
pip install -r requirements/base.txt
pip install -r requirements/tests.txt
pip install -r requirements/extra.txt
pip install -r requirements/openid.txt
- name: Run tests
run: |
nose2 -c setup.cfg -F -v --with-coverage --coverage flask_appbuilder -A 'openid' tests
- name: Upload code coverage
run: |
bash <(curl -s https://codecov.io/bash) -cF python