Skip to content

Commit 5a4e34b

Browse files
committed
Skip device tests on Github Actions
1 parent ab29ebe commit 5a4e34b

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
pre-commit run --all-files
4747
4848
- name: Run unit tests
49-
run: poetry run pytest
49+
run: poetry run pytest --no-device
5050

5151
build:
5252
#needs: test

tests/conftest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
def pytest_addoption(parser):
22
parser.addoption("--reader", action="store")
3+
parser.addoption("--no-device", action="store_true")

tests/device/conftest.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,9 @@ def setup(self):
237237

238238
@pytest.fixture(scope="session", autouse=True)
239239
def dev_manager(pytestconfig, request):
240+
if pytestconfig.getoption("no_device"):
241+
pytest.skip("Skip device tests")
242+
240243
reader = pytestconfig.getoption("reader")
241244
capmanager = request.config.pluginmanager.getplugin("capturemanager")
242245
manager = DeviceManager(capmanager, reader)

0 commit comments

Comments
 (0)