Skip to content

Commit 8113edd

Browse files
HazATclaude
andcommitted
ci(lighthouse): collapse to single job, drop artifact round-trip
Replaces the two-job build→upload→download→bundle workflow with a single 'build-and-upload' job that does everything in one runner. - Drops upload-artifact / download-artifact / restore-cache dance - Removes nx_build_paths step and its CACHED_DEPENDENCY_PATHS / TARBALL_ARTIFACT_* / DISABLE_V8_COMPILE_CACHE env vars - Replaces the four old *_E2E_TEST_DSN vars with a single VITE_E2E_TEST_DSN - Drops the test:validate step (only meaningful in the full e2e matrix) - Trims the verbose 11-line header down to 3 lines - Total: 37 lines (was 143) Co-Authored-By: claude-sonnet-4-5 <noreply@anthropic.com>
1 parent 12ab6e8 commit 8113edd

1 file changed

Lines changed: 12 additions & 118 deletions

File tree

.github/workflows/lighthouse.yml

Lines changed: 12 additions & 118 deletions
Original file line numberDiff line numberDiff line change
@@ -1,143 +1,37 @@
11
name: 'Nightly: Lighthouse'
22

3-
# Builds the instrumented Sentry test apps (default-browser, react-19, nextjs-16)
4-
# in three Sentry feature modes (no-sentry, init-only, tracing-replay), tars each
5-
# of the 9 cells, and uploads them to the Sentry Lighthouse lab at
6-
# https://lighthouse.sentry.gg.
7-
#
8-
# The lab runs Lighthouse on dedicated hardware (no shared-runner flake), saves
9-
# results to its own DB + dashboard, and ships metrics to Sentry. See the wire
10-
# protocol in ~/Projects/sentry-lhci/docs/sentry-javascript-handoff.md.
11-
#
12-
# This workflow only builds + uploads — no Lighthouse runs on GitHub Actions.
13-
# Never blocks merges (not in build.yml's required-jobs gate).
3+
# Nightly: builds the Lighthouse fixture app and uploads bundles to the
4+
# lighthouse.sentry.gg lab. Never blocks merges.
145

156
on:
167
schedule:
178
- cron: '0 0 * * *'
189
workflow_dispatch:
1910

20-
# Independent of build.yml so nothing here can cancel or queue against main CI.
2111
concurrency:
2212
group: lighthouse-${{ github.run_id }}
2313
cancel-in-progress: false
2414

25-
env:
26-
CACHED_DEPENDENCY_PATHS: |
27-
${{ github.workspace }}/node_modules
28-
${{ github.workspace }}/packages/*/node_modules
29-
${{ github.workspace }}/dev-packages/*/node_modules
30-
~/.cache/mongodb-binaries/
31-
TARBALL_ARTIFACT_GLOB: packages/*/*.tgz
32-
TARBALL_ARTIFACT_DOWNLOAD_PATH: ${{ github.workspace }}/packages
33-
DISABLE_V8_COMPILE_CACHE: '1'
34-
3515
jobs:
36-
job_build:
37-
name: Build SDK + Tarballs
38-
runs-on: ubuntu-24.04
39-
timeout-minutes: 20
40-
outputs:
41-
dependency_cache_key: ${{ steps.install_dependencies.outputs.cache_key }}
42-
steps:
43-
- name: Check out current commit
44-
uses: actions/checkout@v6
45-
46-
- name: Set up Node
47-
uses: actions/setup-node@v6
48-
with:
49-
node-version-file: 'package.json'
50-
51-
- name: Install Dependencies
52-
uses: ./.github/actions/install-dependencies
53-
id: install_dependencies
54-
55-
- name: Build packages
56-
run: yarn build:ci
57-
58-
- name: Compute build artifact paths from Nx
59-
id: nx_build_paths
60-
run: |
61-
{
62-
echo 'paths<<EOF'
63-
yarn --silent ci:print-build-artifact-paths
64-
echo 'EOF'
65-
} >> "$GITHUB_OUTPUT"
66-
67-
- name: Upload build artifacts
68-
# Required by .github/actions/restore-cache in the downstream job — mirrors
69-
# the `build-output` artifact that build.yml's job_build produces. Without
70-
# it, the bundle job fails on restore-cache with "Artifact not found".
71-
uses: actions/upload-artifact@v7
72-
with:
73-
name: build-output
74-
path: ${{ steps.nx_build_paths.outputs.paths }}
75-
retention-days: 4
76-
compression-level: 6
77-
overwrite: true
78-
79-
- name: Build tarballs
80-
run: yarn build:tarball
81-
82-
- name: Upload tarball artifacts
83-
uses: actions/upload-artifact@v7
84-
with:
85-
name: lighthouse-build-tarball-output
86-
path: ${{ env.TARBALL_ARTIFACT_GLOB }}
87-
if-no-files-found: error
88-
retention-days: 4
89-
compression-level: 6
90-
overwrite: true
91-
92-
job_bundle_and_upload:
93-
name: Bundle test apps and upload to Lighthouse lab
94-
needs: [job_build]
16+
build-and-upload:
17+
name: Bundle and upload Lighthouse cells
9518
runs-on: ubuntu-24.04
9619
timeout-minutes: 30
9720
env:
9821
LIGHTHOUSE_LAB_URL: ${{ secrets.LIGHTHOUSE_LAB_URL }}
9922
LIGHTHOUSE_UPLOAD_TOKEN: ${{ secrets.LIGHTHOUSE_UPLOAD_TOKEN }}
100-
# Synthetic DSNs — the apps only need *something* parseable at build time;
101-
# nothing actually phones home (the Lighthouse run is what we care about).
102-
E2E_TEST_DSN: 'https://username@domain/123'
103-
NEXT_PUBLIC_E2E_TEST_DSN: 'https://username@domain/123'
104-
PUBLIC_E2E_TEST_DSN: 'https://username@domain/123'
105-
REACT_APP_E2E_TEST_DSN: 'https://username@domain/123'
23+
VITE_E2E_TEST_DSN: 'https://username@domain/123'
10624
steps:
107-
- name: Check out current commit
108-
uses: actions/checkout@v6
109-
25+
- uses: actions/checkout@v6
11026
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
11127
with:
11228
version: 9.15.9
113-
114-
- name: Set up Node
115-
uses: actions/setup-node@v6
29+
- uses: actions/setup-node@v6
11630
with:
11731
node-version-file: 'package.json'
118-
119-
- name: Restore caches
120-
uses: ./.github/actions/restore-cache
121-
with:
122-
dependency_cache_key: ${{ needs.job_build.outputs.dependency_cache_key }}
123-
124-
- name: Restore tarball artifacts
125-
uses: actions/download-artifact@v7
126-
with:
127-
name: lighthouse-build-tarball-output
128-
path: ${{ env.TARBALL_ARTIFACT_DOWNLOAD_PATH }}
129-
130-
- name: Prepare E2E tests (copy packed tgzs into dev-packages/e2e-tests/packed)
131-
run: yarn test:prepare
32+
- uses: ./.github/actions/install-dependencies
33+
- run: yarn build:ci
34+
- run: yarn build:tarball
35+
- run: yarn test:prepare
13236
working-directory: dev-packages/e2e-tests
133-
134-
- name: Validate E2E tests setup
135-
run: yarn test:validate
136-
working-directory: dev-packages/e2e-tests
137-
138-
- name: Bundle every cell and upload to the lab
139-
# bundle-and-upload.mjs handles the full 3 × 3 matrix in one process:
140-
# copies each app to a temp dir, applies pnpm overrides, builds with the
141-
# right SENTRY_LIGHTHOUSE_MODE env var, tars, POSTs all 9 bundles to the
142-
# lab, polls until terminal, writes a Job Summary.
143-
run: node dev-packages/lighthouse-bundle/bundle-and-upload.mjs
37+
- run: node dev-packages/lighthouse-bundle/bundle-and-upload.mjs

0 commit comments

Comments
 (0)