-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
190 changed files
with
10,707 additions
and
9,791 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,21 +9,21 @@ on: | |
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-18.04 | ||
runs-on: ubuntu-22.04 | ||
strategy: | ||
matrix: | ||
python-version: [3.7] | ||
python-version: [3.8] | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v3 | ||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y python-dev libldap2-dev libsasl2-dev libssl-dev | ||
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 | ||
|
@@ -33,50 +33,66 @@ jobs: | |
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-18.04 | ||
runs-on: ubuntu-22.04 | ||
strategy: | ||
matrix: | ||
python-version: [3.6, 3.7, 3.8, 3.9.7] | ||
python-version: ["3.7", "3.8", "3.9"] | ||
env: | ||
SQLALCHEMY_DATABASE_URI: | ||
postgresql+psycopg2://pguser:[email protected]:15432/app | ||
services: | ||
postgres: | ||
image: postgres:10-alpine | ||
image: postgres:14-alpine | ||
env: | ||
POSTGRES_USER: pguser | ||
POSTGRES_PASSWORD: pguserpassword | ||
POSTGRES_DB: app | ||
ports: | ||
- 15432:5432 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v3 | ||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
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 python-dev libldap2-dev libsasl2-dev libssl-dev | ||
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 flask_appbuilder.tests --ignore-files="test_mongoengine\.py" | ||
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-18.04 | ||
runs-on: ubuntu-22.04 | ||
strategy: | ||
matrix: | ||
python-version: [3.7] | ||
python-version: [3.8] | ||
env: | ||
SQLALCHEMY_DATABASE_URI: | | ||
mysql+mysqldb://mysqluser:[email protected]:13306/app?charset=utf8mb4&binary_prefix=true | ||
|
@@ -91,31 +107,43 @@ jobs: | |
ports: | ||
- 13306:3306 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v3 | ||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
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 python-dev libldap2-dev libsasl2-dev libssl-dev | ||
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 flask_appbuilder.tests --ignore-files="test_mongoengine\.py" | ||
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-18.04 | ||
runs-on: ubuntu-22.04 | ||
strategy: | ||
matrix: | ||
python-version: [3.7] | ||
python-version: [3.8] | ||
env: | ||
SQLALCHEMY_DATABASE_URI: | | ||
mssql+pyodbc://sa:Password_123@localhost:11433/master?driver=FreeTDS | ||
|
@@ -128,54 +156,79 @@ jobs: | |
ports: | ||
- 11433:1433 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v3 | ||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
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 python-dev libldap2-dev libsasl2-dev libssl-dev freetds-bin unixodbc-dev tdsodbc | ||
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 flask_appbuilder.tests --ignore-files="test_mongoengine\.py" | ||
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-18.04 | ||
runs-on: ubuntu-22.04 | ||
strategy: | ||
matrix: | ||
python-version: [3.6, 3.7] | ||
python-version: [3.7] | ||
services: | ||
mssql: | ||
mongo: | ||
image: mongo:4.4.1-bionic | ||
ports: | ||
- 27017:27017 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v3 | ||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
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 python-dev libldap2-dev libsasl2-dev libssl-dev | ||
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 flask_appbuilder/tests/test_mongoengine.py | ||
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 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: "CodeQL" | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
paths: | ||
- 'flask_appbuilder/**' | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: [ "master" ] | ||
paths: | ||
- 'flask_appbuilder/**' | ||
schedule: | ||
- cron: '0 4 * * *' | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-22.04 | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: [ 'python' ] | ||
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
# Initializes the CodeQL tools for scanning. | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v2 | ||
with: | ||
languages: ${{ matrix.language }} | ||
# If you wish to specify custom queries, you can do so here or in a config file. | ||
# By default, queries listed here will override any specified in a config file. | ||
# Prefix the list here with "+" to use these queries and those in the config file. | ||
|
||
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs | ||
# queries: security-extended,security-and-quality | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v2 | ||
with: | ||
category: "/language:${{matrix.language}}" |
Oops, something went wrong.