Skip to content

Commit f5c0c94

Browse files
authored
fix(ci): Skip selenium plugin import on non-acceptance backend test shards (#109757)
- We don't need to load the rather large selenium plugin for non-acceptance tests. - Set `SENTRY_SKIP_SELENIUM_PLUGIN=1` at the workflow level in `backend.yml` and `backend-with-coverage.yml`. Acceptance workflows are unaffected.
1 parent 927fdde commit f5c0c94

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

.github/workflows/backend-with-coverage.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
schedule:
88
- cron: '0,30 * * * *'
99

10+
env:
11+
SENTRY_SKIP_SELENIUM_PLUGIN: '1'
12+
1013
jobs:
1114
# Skip generating coverage if already exists in GCS
1215
check-existing-coverage:

.github/workflows/backend.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ concurrency:
1818
env:
1919
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3
2020
SNUBA_NO_WORKERS: 1
21+
SENTRY_SKIP_SELENIUM_PLUGIN: '1'
2122

2223
jobs:
2324
files-changed:

src/sentry/testutils/pytest/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
import os
2+
13
pytest_plugins = [
24
"sentry.testutils.skips",
35
"sentry.testutils.pytest.sentry",
4-
"sentry.testutils.pytest.selenium",
56
"sentry.testutils.pytest.fixtures",
67
"sentry.testutils.pytest.unittest",
78
"sentry.testutils.pytest.kafka",
@@ -12,3 +13,6 @@
1213
"sentry.testutils.pytest.show_flaky_failures",
1314
"sentry.testutils.thread_leaks.pytest",
1415
]
16+
17+
if os.environ.get("SENTRY_SKIP_SELENIUM_PLUGIN") != "1":
18+
pytest_plugins.append("sentry.testutils.pytest.selenium")

0 commit comments

Comments
 (0)