Skip to content

Commit

Permalink
fix and update github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
aris-koning committed Sep 16, 2024
1 parent 7b49c73 commit d768d76
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 67 deletions.
45 changes: 27 additions & 18 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,40 @@ on: [push]
jobs:
linux-test:
runs-on: ubuntu-20.04
env:
DATABASE: test
continue-on-error: true
services:
monetdb:
image: "monetdb/dev-builds:Aug2024"
env:
MDB_CREATE_DBS: '${{ env.DATABASE }}'
MDB_DB_ADMIN_PASS: monetdb
ports:
- 50000:50000
strategy:
matrix:
branch: [default]
python-version: [3.8, 3.9, '3.10', '3.11']
container: monetdb/dev-builds:${{ matrix.branch }}
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- name: Checkout
uses: actions/checkout@v3

uses: actions/checkout@v4
- name: Install Debian packages
run: |
sudo apt-get update -qq
sudo apt-get install -y software-properties-common curl make
curl https://www.monetdb.org/downloads/MonetDB-GPG-KEY | sudo apt-key add -
sudo add-apt-repository 'deb http://dev.monetdb.org/downloads/deb/ focal monetdb'
sudo apt-get update -qq
sudo apt-get install -y monetdb-client
- name: Initialize MonetDB database
run: |
sudo -u monetdb mclient -d "monetdb://localhost:50000/${{ env.DATABASE }}?user=monetdb&password=monetdb" -s "create schema test_schema;"
sudo -u monetdb mclient -d "monetdb://localhost:50000/${{ env.DATABASE }}?user=monetdb&password=monetdb" -s "create schema test_schema2;"
sudo -u monetdb mclient -d "monetdb://localhost:50000/${{ env.DATABASE }}?user=monetdb&password=monetdb" -s "alter user monetdb set schema test_schema2;"
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

# - name: Setup database
# run: |
# cd test
# ./initfarm.sh
# ./initdb.sh

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox tox-gh-actions
- name: Run Tox
run: tox
- name: Run tests
run: make pytest
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ pip-log.txt

# Unit test / coverage reports
.coverage
.tox
nosetests.xml

# Translations
Expand Down
16 changes: 1 addition & 15 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,23 +1,9 @@

venv/:
python3 -m venv venv
venv/bin/pip install --upgrade pip wheel setuptools

venv/bin/pytest: venv/
venv/bin/pip install -e ".[test]"

pytest: venv/bin/pytest
venv/bin/pytest -r A

venv/bin/tox: venv/
venv/bin/pip install tox

tox: venv/bin/tox
venv/bin/tox

setup: venv/
venv/bin/pip install -e ".[test]"

test: tox

clean:
rm -rf .tox/ build/
1 change: 0 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,3 @@ More info

* http://www.sqlalchemy.org/
* http://www.monetdb.org/

2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ sqlalchemy.dialects =


[options.extras_require]
testing =
test =
pytest>=7.4.0
pytest-cov>=4.1.0
coverage>=7.3.0
Expand Down
2 changes: 1 addition & 1 deletion sqlalchemy_monetdb/dialect.py
Original file line number Diff line number Diff line change
Expand Up @@ -903,7 +903,7 @@ def get_unique_constraints(
return res


def get_check_constraints(self, connection: "Connection", table_name: str, schema: str | None = None, **kw:Any) -> List[ReflectedCheckConstraint]:
def get_check_constraints(self, connection, table_name, schema, **kw):
"""Return information about check constraints in `table_name`.
Given a string `table_name` and an optional string `schema`, return
Expand Down
3 changes: 1 addition & 2 deletions test/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ Create a test schema::

Now you can run the test suite::

$ tox

$ pytest test

The ``--db`` flag selects one of the preconfigured database URLs defined in setup.cfg.
28 changes: 0 additions & 28 deletions tox.ini

This file was deleted.

0 comments on commit d768d76

Please sign in to comment.