Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 40 additions & 46 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "CI: Build & Test"
name: 'CI: Build & Test'
on:
push:
branches:
Expand All @@ -17,7 +17,7 @@ on:
required: false
schedule:
# Run every day at midnight (without cache)
- cron: "0 0 * * *"
- cron: '0 0 * * *'

# Cancel in progress workflows on pull_requests.
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
Expand Down Expand Up @@ -57,7 +57,7 @@ env:
# https://bsky.app/profile/joyeecheung.bsky.social/post/3lhy6o54fo22h
# Apparently some of our CI failures are attributable to a corrupt v8 cache, causing v8 failures with: "Check failed: current == end_slot_index.".
# This option both controls the `v8-compile-cache-lib` and `v8-compile-cache` packages.
DISABLE_V8_COMPILE_CACHE: "1"
DISABLE_V8_COMPILE_CACHE: '1'

jobs:
job_get_metadata:
Expand Down Expand Up @@ -85,15 +85,15 @@ jobs:
with:
ref: ${{ github.event.pull_request.base.sha }}

- name: "Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})"
- name: 'Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})'
uses: actions/checkout@v6
with:
ref: ${{ env.HEAD_COMMIT }}

- name: Set up Node
uses: actions/setup-node@v6
with:
node-version-file: "package.json"
node-version-file: 'package.json'

- name: Install Dependencies
uses: ./.github/actions/install-dependencies
Expand Down Expand Up @@ -200,7 +200,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v6
with:
node-version-file: "package.json"
node-version-file: 'package.json'
- name: Restore NX cache
uses: actions/cache/restore@v5
with:
Expand Down Expand Up @@ -239,7 +239,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v6
with:
node-version-file: "package.json"
node-version-file: 'package.json'
- name: Restore NX cache
uses: actions/cache/restore@v5
with:
Expand Down Expand Up @@ -296,7 +296,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v6
with:
node-version-file: "package.json"
node-version-file: 'package.json'
- name: Restore caches
uses: ./.github/actions/restore-cache
with:
Expand Down Expand Up @@ -328,7 +328,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v6
with:
node-version-file: "package.json"
node-version-file: 'package.json'
- name: Restore caches
uses: ./.github/actions/restore-cache
with:
Expand All @@ -351,7 +351,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v6
with:
node-version-file: "package.json"
node-version-file: 'package.json'
- name: Check that yarn.lock is stable
run: yarn install --frozen-lockfile --ignore-engines
- name: Check for duplicate dependencies in lockfile
Expand All @@ -371,7 +371,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v6
with:
node-version-file: "package.json"
node-version-file: 'package.json'

- name: Install Dependencies
uses: ./.github/actions/install-dependencies
Expand All @@ -393,7 +393,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v6
with:
node-version-file: "package.json"
node-version-file: 'package.json'
- name: Restore caches
uses: ./.github/actions/restore-cache
with:
Expand All @@ -403,14 +403,7 @@ jobs:

job_artifacts:
name: Upload Artifacts
needs:
[
job_get_metadata,
job_build,
job_build_layer,
job_build_bundles,
job_build_tarballs,
]
needs: [job_get_metadata, job_build, job_build_layer, job_build_bundles, job_build_tarballs]
runs-on: ubuntu-24.04
# Build artifacts are only needed for releasing workflow.
if: needs.job_get_metadata.outputs.is_release == 'true'
Expand All @@ -422,7 +415,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v6
with:
node-version-file: "package.json"
node-version-file: 'package.json'
- name: Restore caches
uses: ./.github/actions/restore-cache
with:
Expand Down Expand Up @@ -478,7 +471,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v6
with:
node-version-file: "package.json"
node-version-file: 'package.json'
- name: Restore caches
uses: ./.github/actions/restore-cache
with:
Expand Down Expand Up @@ -513,7 +506,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v6
with:
node-version-file: "package.json"
node-version-file: 'package.json'
- name: Set up Bun
uses: oven-sh/setup-bun@v2
- name: Restore caches
Expand All @@ -538,7 +531,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v6
with:
node-version-file: "package.json"
node-version-file: 'package.json'
- name: Set up Deno
uses: denoland/setup-deno@v2.0.4
with:
Expand Down Expand Up @@ -632,9 +625,9 @@ jobs:
# Only check all projects for full bundle
# We also shard the tests as they take the longest
- bundle: bundle_tracing_replay_feedback_logs_metrics_min
project: "webkit"
project: 'webkit'
- bundle: bundle_tracing_replay_feedback_logs_metrics_min
project: "firefox"
project: 'firefox'
- bundle: esm
project: chromium
shard: 1
Expand All @@ -654,7 +647,7 @@ jobs:
exclude:
# Do not run the un-sharded esm tests
- bundle: esm
project: "chromium"
project: 'chromium'

steps:
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
Expand All @@ -664,7 +657,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v6
with:
node-version-file: "package.json"
node-version-file: 'package.json'
- name: Restore caches
uses: ./.github/actions/restore-cache
with:
Expand Down Expand Up @@ -738,7 +731,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v6
with:
node-version-file: "package.json"
node-version-file: 'package.json'
- name: Restore caches
uses: ./.github/actions/restore-cache
with:
Expand Down Expand Up @@ -794,7 +787,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v6
with:
node-version-file: "package.json"
node-version-file: 'package.json'
- name: Restore caches
uses: ./.github/actions/restore-cache
with:
Expand Down Expand Up @@ -823,7 +816,7 @@ jobs:
include:
# Only check typescript for latest version (to streamline CI)
- node: 24
typescript: "3.8"
typescript: '3.8'
steps:
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
uses: actions/checkout@v6
Expand Down Expand Up @@ -864,7 +857,7 @@ jobs:
include:
# Only check typescript for latest version (to streamline CI)
- node: 24
typescript: "3.8"
typescript: '3.8'
steps:
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
uses: actions/checkout@v6
Expand Down Expand Up @@ -901,7 +894,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v6
with:
node-version-file: "package.json"
node-version-file: 'package.json'
- name: Restore caches
uses: ./.github/actions/restore-cache
with:
Expand All @@ -925,7 +918,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v6
with:
node-version-file: "package.json"
node-version-file: 'package.json'
- name: Set up Bun
uses: oven-sh/setup-bun@v2
- name: Restore caches
Expand Down Expand Up @@ -991,7 +984,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v6
with:
node-version-file: "package.json"
node-version-file: 'package.json'
- name: Restore NX cache
uses: actions/cache/restore@v5
with:
Expand Down Expand Up @@ -1022,19 +1015,20 @@ jobs:
name: E2E ${{ matrix.label || matrix.test-application }} Test
# We need to add the `always()` check here because the previous step has this as well :(
# See: https://github.com/actions/runner/issues/2205
if: always() && needs.job_build_tarballs.result == 'success' && needs.job_build.outputs.e2e-matrix !='{"include":[]}'
if:
always() && needs.job_build_tarballs.result == 'success' && needs.job_build.outputs.e2e-matrix !='{"include":[]}'
needs: [job_get_metadata, job_build, job_build_layer, job_build_tarballs]
runs-on: ubuntu-24.04
timeout-minutes: 15
env:
# We just use a dummy DSN here, only send to the tunnel anyhow
E2E_TEST_DSN: "https://username@domain/123"
E2E_TEST_DSN: 'https://username@domain/123'
# Needed because some apps expect a certain prefix
NEXT_PUBLIC_E2E_TEST_DSN: "https://username@domain/123"
PUBLIC_E2E_TEST_DSN: "https://username@domain/123"
REACT_APP_E2E_TEST_DSN: "https://username@domain/123"
E2E_TEST_SENTRY_ORG_SLUG: "sentry-javascript-sdks"
E2E_TEST_SENTRY_PROJECT: "sentry-javascript-e2e-tests"
NEXT_PUBLIC_E2E_TEST_DSN: 'https://username@domain/123'
PUBLIC_E2E_TEST_DSN: 'https://username@domain/123'
REACT_APP_E2E_TEST_DSN: 'https://username@domain/123'
E2E_TEST_SENTRY_ORG_SLUG: 'sentry-javascript-sdks'
E2E_TEST_SENTRY_PROJECT: 'sentry-javascript-e2e-tests'
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.job_build.outputs.e2e-matrix) }}
Expand All @@ -1049,7 +1043,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v6
with:
node-version-file: "dev-packages/e2e-tests/test-applications/${{ matrix.test-application }}/package.json"
node-version-file: 'dev-packages/e2e-tests/test-applications/${{ matrix.test-application }}/package.json'
- name: Set up Bun
if:
contains(fromJSON('["node-exports-test-app","nextjs-16-bun", "elysia-bun", "hono-4"]'),
Expand Down Expand Up @@ -1166,8 +1160,8 @@ jobs:
NEXT_PUBLIC_E2E_TEST_DSN: ${{ secrets.E2E_TEST_DSN }}
PUBLIC_E2E_TEST_DSN: ${{ secrets.E2E_TEST_DSN }}
REACT_APP_E2E_TEST_DSN: ${{ secrets.E2E_TEST_DSN }}
E2E_TEST_SENTRY_ORG_SLUG: "sentry-javascript-sdks"
E2E_TEST_SENTRY_PROJECT: "sentry-javascript-e2e-tests"
E2E_TEST_SENTRY_ORG_SLUG: 'sentry-javascript-sdks'
E2E_TEST_SENTRY_PROJECT: 'sentry-javascript-e2e-tests'
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.job_build.outputs.e2e-matrix-optional) }}
Expand All @@ -1183,7 +1177,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v6
with:
node-version-file: "dev-packages/e2e-tests/test-applications/${{ matrix.test-application }}/package.json"
node-version-file: 'dev-packages/e2e-tests/test-applications/${{ matrix.test-application }}/package.json'
- name: Restore caches
uses: ./.github/actions/restore-cache
with:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import type ApplicationInstance from '@ember/application/instance';
import { addIntegration, browserTracingIntegration } from '@sentry/ember';
import { instrumentAppInstancePerformance } from '@sentry/ember';

export function initialize(appInstance: ApplicationInstance): void {
addIntegration(browserTracingIntegration({
appInstance,
instrumentAppInstancePerformance(appInstance, {
minimumRunloopQueueDuration: 0,
minimumComponentRenderDuration: 0,
}));
});
}

export default {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ test('sends an error', async ({ page }) => {

test('assigns the correct transaction value after a navigation', async ({ page }) => {
const pageloadTxnPromise = waitForTransaction('ember-classic', async transactionEvent => {
return !!transactionEvent?.transaction && transactionEvent.contexts?.trace?.op === 'pageload';
return !!transactionEvent.transaction && transactionEvent.contexts?.trace?.op === 'pageload';
});

const errorPromise = waitForError('ember-classic', async errorEvent => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { waitForTransaction } from '@sentry-internal/test-utils';

test('sends a pageload transaction with a parameterized URL', async ({ page }) => {
const transactionPromise = waitForTransaction('ember-classic', async transactionEvent => {
return !!transactionEvent?.transaction && transactionEvent.contexts?.trace?.op === 'pageload';
return !!transactionEvent.transaction && transactionEvent.contexts?.trace?.op === 'pageload';
});

await page.goto(`/`);
Expand All @@ -26,11 +26,11 @@ test('sends a pageload transaction with a parameterized URL', async ({ page }) =

test('sends a navigation transaction with a parameterized URL', async ({ page }) => {
const pageloadTxnPromise = waitForTransaction('ember-classic', async transactionEvent => {
return !!transactionEvent?.transaction && transactionEvent.contexts?.trace?.op === 'pageload';
return !!transactionEvent.transaction && transactionEvent.contexts?.trace?.op === 'pageload';
});

const navigationTxnPromise = waitForTransaction('ember-classic', async transactionEvent => {
return !!transactionEvent?.transaction && transactionEvent.contexts?.trace?.op === 'navigation';
return !!transactionEvent.transaction && transactionEvent.contexts?.trace?.op === 'navigation';
});

await page.goto(`/`);
Expand All @@ -54,11 +54,11 @@ test('sends a navigation transaction with a parameterized URL', async ({ page })

test('sends a navigation transaction even if the pageload span is still active', async ({ page }) => {
const pageloadTxnPromise = waitForTransaction('ember-classic', async transactionEvent => {
return !!transactionEvent?.transaction && transactionEvent.contexts?.trace?.op === 'pageload';
return !!transactionEvent.transaction && transactionEvent.contexts?.trace?.op === 'pageload';
});

const navigationTxnPromise = waitForTransaction('ember-classic', async transactionEvent => {
return !!transactionEvent?.transaction && transactionEvent.contexts?.trace?.op === 'navigation';
return !!transactionEvent.transaction && transactionEvent.contexts?.trace?.op === 'navigation';
});

await page.goto(`/`);
Expand Down Expand Up @@ -99,11 +99,11 @@ test('sends a navigation transaction even if the pageload span is still active',

test('captures correct spans for navigation', async ({ page }) => {
const pageloadTxnPromise = waitForTransaction('ember-classic', async transactionEvent => {
return !!transactionEvent?.transaction && transactionEvent.contexts?.trace?.op === 'pageload';
return !!transactionEvent.transaction && transactionEvent.contexts?.trace?.op === 'pageload';
});

const navigationTxnPromise = waitForTransaction('ember-classic', async transactionEvent => {
return !!transactionEvent?.transaction && transactionEvent.contexts?.trace?.op === 'navigation';
return !!transactionEvent.transaction && transactionEvent.contexts?.trace?.op === 'navigation';
});

await page.goto(`/tracing`);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import type ApplicationInstance from '@ember/application/instance';
import { addIntegration, browserTracingIntegration } from '@sentry/ember';
import { instrumentAppInstancePerformance } from '@sentry/ember';

export function initialize(appInstance: ApplicationInstance): void {
addIntegration(browserTracingIntegration({
appInstance,
instrumentAppInstancePerformance(appInstance, {
minimumRunloopQueueDuration: 0,
minimumComponentRenderDuration: 0,
}));
});
}

export default {
Expand Down
Loading