Skip to content

Commit 07655be

Browse files
committed
fixup
1 parent b996bd8 commit 07655be

File tree

16 files changed

+72
-1577
lines changed

16 files changed

+72
-1577
lines changed

.github/workflows/build-envs.yml

Lines changed: 0 additions & 258 deletions
This file was deleted.

.github/workflows/build.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@ jobs:
100100
- 'packages/browser/**'
101101
- 'packages/replay/**'
102102
- 'packages/feedback/**'
103+
astro:
104+
- *browser
105+
- 'packages/astro/**'
106+
- 'dev-packages/e2e-tests/test-applications/cloudflare-astro/**'
103107
browser_integration:
104108
- *shared
105109
- *browser
@@ -137,6 +141,7 @@ jobs:
137141

138142
outputs:
139143
commit_label: '${{ env.COMMIT_SHA }}: ${{ env.COMMIT_MESSAGE }}'
144+
changed_astro: ${{ steps.changed.outputs.astro }}
140145
changed_nextjs: ${{ steps.changed.outputs.nextjs }}
141146
changed_ember: ${{ steps.changed.outputs.ember }}
142147
changed_remix: ${{ steps.changed.outputs.remix }}
@@ -262,6 +267,37 @@ jobs:
262267
# `job_build` can't see `job_install_deps` and what it returned)
263268
dependency_cache_key: ${{ needs.job_install_deps.outputs.dependency_cache_key }}
264269

270+
job_deploy_cloudflare:
271+
name: Cloudflare
272+
needs: [job_get_metadata, job_build]
273+
timeout-minutes: 15
274+
runs-on: ubuntu-20.04
275+
if:
276+
github.event_name == 'pull_request' || needs.job_get_metadata.outputs.changed_astro == 'true'
277+
steps:
278+
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
279+
uses: actions/checkout@v4
280+
with:
281+
ref: ${{ env.HEAD_COMMIT }}
282+
- name: Set up Node
283+
uses: actions/setup-node@v4
284+
with:
285+
node-version-file: 'package.json'
286+
- name: Restore caches
287+
uses: ./.github/actions/restore-cache
288+
env:
289+
DEPENDENCY_CACHE_KEY: ${{ needs.job_build.outputs.dependency_cache_key }}
290+
- name: Deploy Astro
291+
uses: cloudflare/pages-action@v1
292+
if: steps.cache_built_packages.outputs.cache-hit == ''
293+
with:
294+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
295+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
296+
projectName: ${{ secrets.CLOUDFLARE_PROJECT_NAME }}
297+
directory: build
298+
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
299+
workingDirectory: dev-packages/e2e-tests/test-applications/cloudflare-astro
300+
265301
job_size_check:
266302
name: Size Check
267303
needs: [job_get_metadata, job_build]
@@ -858,6 +894,7 @@ jobs:
858894
matrix:
859895
test-application:
860896
[
897+
'cloudflare-astro',
861898
'node-express-app',
862899
'create-react-app',
863900
'create-next-app',

dev-packages/env-tests/cloudflare-astro/astro.config.mjs renamed to dev-packages/e2e-tests/test-applications/cloudflare-astro/astro.config.mjs

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
import cloudflare from '@astrojs/cloudflare';
2+
import sentry from '@sentry/astro';
13
import { defineConfig } from 'astro/config';
2-
import cloudflare from '@astrojs/cloudflare'
3-
import sentry from '@sentry/astro'
4+
5+
const dsn = process.env.E2E_TEST_DSN;
46

57
// https://astro.build/config
68
export default defineConfig({
@@ -10,13 +12,8 @@ export default defineConfig({
1012
}),
1113
integrations: [
1214
sentry({
13-
dsn: '',
14-
autoInstrumentation: {
15-
requestHandler: true,
16-
},
17-
sourceMapsUploadOptions: {
18-
enabled: false,
19-
},
15+
enabled: Boolean(dsn),
16+
dsn,
2017
clientInitPath: 'sentry.client.mjs',
2118
serverInitPath: 'sentry.server.mjs',
2219
}),
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
{
2-
"name": "@sentry-internal/env-tests-cloudflare-astro",
2+
"name": "cloudflare-astro",
33
"type": "module",
44
"version": "0.0.1",
55
"private": true,
66
"scripts": {
77
"dev": "astro dev",
88
"start": "astro dev",
9-
"build": "astro build",
9+
"build": "yarn build:bundle",
10+
"build:bundle": "astro build",
1011
"preview": "astro preview",
1112
"astro": "astro"
1213
},
@@ -15,5 +16,8 @@
1516
"@astrojs/cloudflare": "^8.0.2",
1617
"@sentry/astro": "7.92.0",
1718
"@sentry/profiling-node": "^1.3.2"
19+
},
20+
"volta": {
21+
"extends": "../../../package.json"
1822
}
1923
}
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import * as Sentry from '@sentry/astro'
1+
import * as Sentry from '@sentry/astro';
22

33
Sentry.init({
44
dsn: process.env.E2E_TEST_DSN,
55
tracesSampleRate: 1,
66
integrations: [],
7-
})
7+
});
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import * as Sentry from '@sentry/astro';
2+
import { ProfilingIntegration } from '@sentry/profiling-node';
3+
4+
Sentry.init({
5+
dsn: process.env.E2E_TEST_DSN,
6+
integrations: [new ProfilingIntegration()],
7+
});

0 commit comments

Comments
 (0)