diff --git a/.github/workflows/sqlalchemy.yaml b/.github/workflows/sqlalchemy.yaml new file mode 100644 index 00000000..f8711776 --- /dev/null +++ b/.github/workflows/sqlalchemy.yaml @@ -0,0 +1,44 @@ +name: SQLAlchemy compat test + +on: + push: + branches: + - main + pull_request: + +jobs: + build: + runs-on: ubuntu-20.04 + steps: + - name: Start MySQL + run: | + sudo systemctl start mysql.service + mysql -uroot -proot -e "CREATE DATABASE test_schema CHARSET utf8mb4" + mysql -uroot -proot -e "CREATE USER 'scott' IDENTIFIED BY 'tiger'" + mysql -uroot -proot -e "GRANT ALL ON *.* TO 'scott'" + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: "3.9" + + - name: Install mysqlclient + env: + PIP_NO_PYTHON_VERSION_WARNING: 1 + PIP_DISABLE_PIP_VERSION_CHECK: 1 + run: | + pip install -U pytest pytest-cov + #python setup.py develop + pip install -v mysqlclient # Use stable version + python -VV + python -c 'import MySQLdb' + + - name: Run SQLAlchemy test + run: | + wget https://files.pythonhosted.org/packages/f6/d6/fcf14b752daba13a02a6669eccb025bf3ba3f814741cd23253c180a12fff/SQLAlchemy-1.4.35.tar.gz + tar xf SQLAlchemy-1.4.35.tar.gz + cd SQLAlchemy-1.4.35 + pip install . + pwd + python -c 'import MySQLdb' + pytest --dburi=mysql://scott:tiger@127.0.0.1:3306/test_schema?charset=utf8mb4 test/