Skip to content

Commit

Permalink
Merge pull request #6648 from markotoplak/nightly
Browse files Browse the repository at this point in the history
[CI] Test with scientific python nightly wheels
  • Loading branch information
PrimozGodec committed Nov 27, 2023
2 parents e5ceec7 + 34ac519 commit ab868dc
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 14 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ jobs:
python-version: '3.10'
tox_env: pyqt6
name: PyQt6
- os: ubuntu-22.04
python-version: '3.11'
tox_env: beta
name: "Scientific Python nightly wheels"

services:
postgres:
Expand Down
27 changes: 13 additions & 14 deletions Orange/tests/sql/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,24 +332,13 @@ class DataBaseTest:

@classmethod
def _check_db(cls, db):
ver = None
if ">" in db:
i = db.find(">")
if db[:i] in cls.db_conn and \
cls.db_conn[db[:i]].version <= int(db[i + 1:]):
raise unittest.SkipTest(
"This test is only run database version higher then {}"
.format(db[i + 1:]))
else:
db = db[:i]
db, ver = db[:i], db[i:]
elif "<" in db:
i = db.find("<")
if db[:i] in cls.db_conn and \
cls.db_conn[db[:i]].version >= int(db[i + 1:]):
raise unittest.SkipTest(
"This test is only run on database version lower then {}"
.format(db[i + 1:]))
else:
db = db[:i]
db, ver = db[:i], db[i:]

if db in cls.db_conn:
if not cls.db_conn[db].is_module:
Expand All @@ -365,6 +354,16 @@ def _check_db(cls, db):
else:
raise Exception("Unsupported database")

if ver is not None:
if ver[0] == ">" and cls.db_conn[db].version <= int(ver[1:]):
raise unittest.SkipTest(
"This test is only run database version higher then {}"
.format(ver[1:]))
if ver[0] == "<" and cls.db_conn[db].version >= int(ver[1:]):
raise unittest.SkipTest(
"This test is only run on database version lower then {}"
.format(ver[1:]))

return db

@classmethod
Expand Down
24 changes: 24 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,30 @@ commands =
# codecov-actions wants xml report
coverage xml -o {toxinidir}/coverage.xml

[testenv:beta]
changedir =
{envsitepackagesdir}
setenv =
QT_API=PyQt6
ANYQT_HOOK_DENY=pyqt5
PIP_EXTRA_INDEX_URL=https://pypi.anaconda.org/scientific-python-nightly-wheels/simple
PIP_PRE=1
deps =
latest: https://github.com/pyqtgraph/pyqtgraph/archive/refs/heads/master.zip#egg=pyqtgraph
latest: https://github.com/biolab/orange-canvas-core/archive/refs/heads/master.zip#egg=orange-canvas-core
latest: https://github.com/biolab/orange-widget-base/archive/refs/heads/master.zip#egg=orange-widget-base
PyQt6==6.5.*
PyQt6-Qt6==6.5.*
PyQt6-WebEngine==6.5.*
PyQt6-WebEngine-Qt6==6.5.*
commands_pre =
# Verify installed packages have compatible dependencies
pip check
# freeze environment
pip freeze
commands =
python -m unittest -v Orange.tests Orange.widgets.tests

[testenv:pyqt6]
changedir =
{envsitepackagesdir}
Expand Down

0 comments on commit ab868dc

Please sign in to comment.