Skip to content

Commit 60ddcf3

Browse files
committed
test: New integration tests
1 parent f551c70 commit 60ddcf3

34 files changed

+663
-97
lines changed

.github/workflows/checks.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,43 @@ jobs:
162162
path: packages
163163
- run: yarn test:integration
164164

165+
test-integration-next:
166+
needs: build
167+
name: "Integration Tests Next (Node ${{ matrix.node-version }}, OS ${{ matrix.os }})"
168+
strategy:
169+
fail-fast: false
170+
matrix:
171+
node-version: [18, 20, 22, 24]
172+
os: [ubuntu-latest, windows-latest]
173+
runs-on: ${{ matrix.os }}
174+
steps:
175+
- uses: actions/checkout@v4
176+
- uses: actions/setup-node@v4
177+
with:
178+
node-version: ${{ matrix.node-version }}
179+
- name: Use dependency cache
180+
uses: actions/cache@v4
181+
id: dependency-cache
182+
with:
183+
path: "**/node_modules"
184+
key: ${{ runner.os }}-${{ hashFiles('**/package.json') }}-${{ hashFiles('**/yarn.lock') }}
185+
- name: Use build cache
186+
uses: actions/cache@v4
187+
with:
188+
path: .nxcache
189+
key: build-cache-key-${{ runner.os }}-${{ github.run_id }}
190+
restore-keys: |
191+
build-cache-key-${{ runner.os }}-
192+
- name: Install dependencies
193+
run: yarn --frozen-lockfile --ignore-engines
194+
if: steps.dependency-cache.outputs.cache-hit != 'true'
195+
- name: Download build artifacts
196+
uses: actions/download-artifact@v4
197+
with:
198+
name: dist-artifacts-${{ github.run_id }}
199+
path: packages
200+
- run: yarn test:integration-next
201+
165202
test-e2e:
166203
# We only run E2E tests for non-fork PRs because the E2E tests require secrets to work and they can't be accessed from forks
167204
# Dependabot PRs sadly also don't have access to secrets, so we skip them as well

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"editor.defaultFormatter": "oxc.oxc-vscode",
2+
"editor.defaultFormatter": "oxc.oxc-vscode"
33
}

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"homepage": "https://github.com/getsentry/sentry-javascript-bundler-plugins",
77
"private": true,
88
"workspaces": [
9-
"packages/*"
9+
"packages/*",
10+
"packages/integration-tests-next/fixtures/*"
1011
],
1112
"scripts": {
1213
"build": "nx run-many --target=build --all",
@@ -20,6 +21,7 @@
2021
"test:all": "nx run-many --target=test --all",
2122
"test:unit": "nx run-many --target=test --all --exclude=@sentry-internal/integration-tests,@sentry-internal/bundler-plugin-e2e-tests",
2223
"test:integration": "nx run @sentry-internal/integration-tests:test",
24+
"test:integration-next": "nx run @sentry-internal/integration-tests-next:test",
2325
"test:e2e": "nx run @sentry-internal/bundler-plugin-e2e-tests:test",
2426
"lint": "nx run-many --target=lint --all",
2527
"check:formatting": "oxfmt --check .",

packages/babel-plugin-component-annotate/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
"eslint": "^8.18.0",
5959
"vitest": "^4.0.0",
6060
"premove": "^4.0.0",
61-
"rolldown": "^1.0.0-rc.4",
61+
"rolldown": "^1.0.0-rc.6",
6262
"ts-node": "^10.9.1",
6363
"typescript": "^4.7.4"
6464
},

packages/bundler-plugin-core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
"eslint": "^8.18.0",
7373
"vitest": "^4.0.0",
7474
"premove": "^4.0.0",
75-
"rolldown": "^1.0.0-rc.4",
75+
"rolldown": "^1.0.0-rc.6",
7676
"typescript": "^4.7.4"
7777
},
7878
"volta": {

packages/esbuild-plugin/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
"eslint": "^8.18.0",
5858
"vitest": "^4.0.0",
5959
"premove": "^4.0.0",
60-
"rolldown": "^1.0.0-rc.4",
60+
"rolldown": "^1.0.0-rc.6",
6161
"ts-node": "^10.9.1",
6262
"typescript": "^4.7.4"
6363
},
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/** @type {import('eslint').ESLint.Options} */
2+
module.exports = {
3+
root: true,
4+
extends: ["@sentry-internal/eslint-config/base"],
5+
ignorePatterns: [".eslintrc.js", "fixtures/*/out", "fixtures/*/src"],
6+
parserOptions: {
7+
tsconfigRootDir: __dirname,
8+
project: ["./tsconfig.json"],
9+
},
10+
env: {
11+
node: true,
12+
},
13+
rules: {
14+
"@typescript-eslint/explicit-function-return-type": "off",
15+
},
16+
};
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
fixtures/*/out/**
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { sentryRollupPlugin } from "@sentry/rollup-plugin";
2+
import { defineConfig } from "rolldown";
3+
4+
export default defineConfig({
5+
input: "src/basic.js",
6+
output: {
7+
file: "out/application-key/basic.js",
8+
},
9+
plugins: [sentryRollupPlugin({ telemetry: false, applicationKey: "1234567890abcdef" })],
10+
});
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { sentryRollupPlugin } from "@sentry/rollup-plugin";
2+
import { defineConfig } from "rolldown";
3+
4+
export default defineConfig({
5+
input: "src/basic.js",
6+
output: {
7+
file: "out/basic-release-disabled/basic.js",
8+
},
9+
plugins: [sentryRollupPlugin({ telemetry: false, release: { inject: false } })],
10+
});

0 commit comments

Comments
 (0)