Skip to content

Commit

Permalink
Skip device tests on Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
dainnilsson committed Jan 15, 2025
1 parent ab29ebe commit 5a4e34b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
pre-commit run --all-files
- name: Run unit tests
run: poetry run pytest
run: poetry run pytest --no-device

build:
#needs: test
Expand Down
1 change: 1 addition & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
def pytest_addoption(parser):
parser.addoption("--reader", action="store")
parser.addoption("--no-device", action="store_true")
3 changes: 3 additions & 0 deletions tests/device/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,9 @@ def setup(self):

@pytest.fixture(scope="session", autouse=True)
def dev_manager(pytestconfig, request):
if pytestconfig.getoption("no_device"):
pytest.skip("Skip device tests")

reader = pytestconfig.getoption("reader")
capmanager = request.config.pluginmanager.getplugin("capturemanager")
manager = DeviceManager(capmanager, reader)
Expand Down

0 comments on commit 5a4e34b

Please sign in to comment.