Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
mapio authored Sep 24, 2023
2 parents 4d04d96 + c6fecdc commit a4cb837
Show file tree
Hide file tree
Showing 190 changed files with 10,707 additions and 9,791 deletions.
115 changes: 84 additions & 31 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
50 changes: 50 additions & 0 deletions .github/workflows/codeql-analysis.yml
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}}"
Loading

0 comments on commit a4cb837

Please sign in to comment.