Skip to content

Commit

Permalink
ci: install only necessary plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmueller committed Dec 22, 2023
1 parent 39d6575 commit d2ae87e
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ jobs:
if: matrix.deps == 'all'
run: |
pip install .[cli,gui]
pip install -r tests/requirements-full.txt
- name: Lint with flake8
run: |
flake8 --exclude _version.py .
Expand Down
16 changes: 15 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,21 @@
TMPDIR = tempfile.mkdtemp(prefix=time.strftime(
"chipstream_test_%H.%M_"))

pytest_plugins = ["pytest-qt"]
pytest_plugins = []

try:
import pytestqt
except ModuleNotFoundError:
pass
else:
pytest_plugins.append("pytest-qt")

try:
import pytest_click
except ModuleNotFoundError:
pass
else:
pytest_plugins.append("pytest_click")


def pytest_configure(config):
Expand Down
3 changes: 3 additions & 0 deletions tests/requirements-full.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pytest
pytest-click
pytest-qt
2 changes: 0 additions & 2 deletions tests/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
pytest
pytest-click
pytest-qt

0 comments on commit d2ae87e

Please sign in to comment.