diff --git a/.github/workflows/sqlalchemy.yaml b/.github/workflows/sqlalchemy.yaml new file mode 100644 index 0000000..abe2ad5 --- /dev/null +++ b/.github/workflows/sqlalchemy.yaml @@ -0,0 +1,45 @@ +name: SQLAlchemy compat test + +on: + push: + +jobs: + build: + runs-on: ubuntu-20.04 + steps: + - name: Start MySQL + run: | + sudo systemctl start mysql.service + mysql -uroot -proot -e "CREATE USER 'scott'@'%' IDENTIFIED BY 'tiger'; CREATE DATABASE test_schema CHARSET utf8mb4; GRANT ALL ON test_schema.* TO scott;" + + - uses: actions/cache@v2 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-sqla-pip-1 + restore-keys: | + ${{ runner.os }}-sqla-pip- + + - name: Set up Python 3.10 + uses: actions/setup-python@v2 + with: + python-version: "3.10" + + - uses: actions/checkout@v2 + with: + fetch-depth: 2 + + - 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 + + - name: Run SQLAlchemy test + run: | + wget https://files.pythonhosted.org/packages/69/2b/f0ee898c3270d965300ec30b0bf06e062c4cc92f35d17ae6046f429c5067/SQLAlchemy-1.4.25.tar.gz + tar xf SQLAlchemy-1.4.25.tar.gz + cd SQLAlchemy-1.4.25 + pip install . + pytest --dburi=mysql://scott:tiger@127.0.0.1:3306/test?charset=utf8mb4 test/