Skip to content

Commit bed88fd

Browse files
committed
Run tracing-only bundle tests.
1 parent 3687d0c commit bed88fd

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.github/workflows/build.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,14 @@ jobs:
288288
- bundle_min
289289
- bundle_es6
290290
- bundle_es6_min
291+
tracing_only:
292+
- true
293+
- false
294+
exclude:
295+
- bundle: esm
296+
tracing_only: true
297+
- bundle: cjs
298+
tracing_only: true
291299
steps:
292300
- name: Check out current commit (${{ github.sha }})
293301
uses: actions/checkout@v2
@@ -308,6 +316,7 @@ jobs:
308316
- name: Run Playwright tests
309317
env:
310318
PW_BUNDLE: ${{ matrix.bundle }}
319+
PW_TRACING_ONLY: ${{ matrix.tracing_only }}
311320
run: |
312321
cd packages/integration-tests
313322
yarn run playwright install-deps webkit

packages/integration-tests/utils/generatePlugin.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { Compiler } from 'webpack';
66

77
const PACKAGE_PATH = '../../packages';
88

9+
const tracingOnly = process.env.PW_TRACING_ONLY === 'true';
910
const bundleKey = process.env.PW_BUNDLE;
1011

1112
// `esm` and `cjs` builds are modules that can be imported / aliased by webpack
@@ -98,7 +99,7 @@ class SentryScenarioGenerationPlugin {
9899
compiler.hooks.compilation.tap(this._name, compilation => {
99100
HtmlWebpackPlugin.getHooks(compilation).alterAssetTags.tapAsync(this._name, (data, cb) => {
100101
if (useBundle && bundleKey) {
101-
const bundleName = this.requiresTracing ? 'tracing' : 'browser';
102+
const bundleName = tracingOnly || this.requiresTracing ? 'tracing' : 'browser';
102103
const bundleObject = createHtmlTagObject('script', {
103104
src: path.resolve(PACKAGE_PATH, bundleName, BUNDLE_PATHS[bundleName][bundleKey]),
104105
});

0 commit comments

Comments
 (0)