|
1 | 1 | name: 'Nightly: Lighthouse' |
2 | 2 |
|
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. |
14 | 5 |
|
15 | 6 | on: |
16 | 7 | schedule: |
17 | 8 | - cron: '0 0 * * *' |
18 | 9 | workflow_dispatch: |
19 | 10 |
|
20 | | -# Independent of build.yml so nothing here can cancel or queue against main CI. |
21 | 11 | concurrency: |
22 | 12 | group: lighthouse-${{ github.run_id }} |
23 | 13 | cancel-in-progress: false |
24 | 14 |
|
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 | | - |
35 | 15 | 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 |
95 | 18 | runs-on: ubuntu-24.04 |
96 | 19 | timeout-minutes: 30 |
97 | 20 | env: |
98 | 21 | LIGHTHOUSE_LAB_URL: ${{ secrets.LIGHTHOUSE_LAB_URL }} |
99 | 22 | 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' |
106 | 24 | steps: |
107 | | - - name: Check out current commit |
108 | | - uses: actions/checkout@v6 |
109 | | - |
| 25 | + - uses: actions/checkout@v6 |
110 | 26 | - uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0 |
111 | 27 | with: |
112 | 28 | version: 9.15.9 |
113 | | - |
114 | | - - name: Set up Node |
115 | | - uses: actions/setup-node@v6 |
| 29 | + - uses: actions/setup-node@v6 |
116 | 30 | with: |
117 | 31 | 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 |
132 | 36 | 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