release: 4.3.8 (#2133) #1391
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
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.txt | |
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.7", "3.8", "3.9"] | |
env: | |
SQLALCHEMY_DATABASE_URI: | |
postgresql+psycopg2://pguser:pguserpassword@127.0.0.1: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@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
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.txt | |
pip install -r requirements-dev.txt | |
pip install -r requirements-extra.txt | |
- name: Run tests | |
run: | | |
nosetests --stop -v --with-coverage --cover-package=flask_appbuilder tests --ignore-files="test_mongoengine\.py" | |
- 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:mysqluserpassword@127.0.0.1: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@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
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.txt | |
pip install -r requirements-dev.txt | |
pip install -r requirements-extra.txt | |
- name: Run tests | |
run: | | |
nosetests --stop -v --with-coverage --cover-package=flask_appbuilder tests --ignore-files="test_mongoengine\.py" | |
- 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@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
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.txt | |
pip install -r requirements-dev.txt | |
pip install -r requirements-extra.txt | |
sudo cp .github/workflows/odbcinst.ini /etc/odbcinst.ini | |
- name: Run tests | |
run: | | |
nosetests --stop -v --with-coverage --cover-package=flask_appbuilder tests --ignore-files="test_mongoengine\.py" | |
- 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.7] | |
services: | |
mongo: | |
image: mongo:4.4.1-bionic | |
ports: | |
- 27017:27017 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
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.txt | |
pip install -r requirements-dev.txt | |
pip install -r requirements-extra.txt | |
pip install -r requirements-mongodb.txt | |
- name: Run tests | |
run: | | |
nosetests --stop -v --with-coverage --cover-package=flask_appbuilder tests/test_mongoengine.py | |
- name: Upload code coverage | |
run: | | |
bash <(curl -s https://codecov.io/bash) -cF python |