Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

misc(ci): Update e2e tests driver #3499

Merged
merged 37 commits into from
Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
acbf6b2
Bump e2e tests to 0.73.0-rc.2
krystofwoldrich Oct 16, 2023
953aba0
Upgrade java version for the new react native
krystofwoldrich Oct 16, 2023
28b0acb
Include prerelease xcode patch script
krystofwoldrich Oct 16, 2023
8df10c8
Merge remote-tracking branch 'origin/main' into kw-rn-0-73
krystofwoldrich Oct 23, 2023
ad46638
Update default xcode version to 14.3
krystofwoldrich Oct 23, 2023
efd498d
Revert "Update default xcode version to 14.3"
krystofwoldrich Oct 25, 2023
1e876e3
Bump ro rc 3
krystofwoldrich Oct 25, 2023
270edc4
Merge branch 'main' into kw-rn-0-73
krystofwoldrich Oct 31, 2023
73a3774
Upgrade android to 0.73 (not all libs are compatible yet)
krystofwoldrich Oct 31, 2023
899523c
Merge branch 'main' into kw-rn-0-73
krystofwoldrich Nov 24, 2023
172341b
Upgrade to latest rc, add safe area patch, fix ios project
krystofwoldrich Nov 24, 2023
56fb902
Remove start package build phase
krystofwoldrich Nov 24, 2023
70b05a5
fix android sample
krystofwoldrich Nov 24, 2023
daaf8af
revert sdk change
krystofwoldrich Nov 24, 2023
c04c7c7
bump ci to node 18
krystofwoldrich Nov 24, 2023
03f4dca
bump java to v17
krystofwoldrich Nov 27, 2023
6198f81
Add x86_64 to bundle platforms
krystofwoldrich Nov 27, 2023
f31943b
keep java 11 for older builds
krystofwoldrich Nov 27, 2023
b9c4968
Fix min ios version RN 0.73 cocoa tester
krystofwoldrich Nov 28, 2023
a6c82da
fix codegen java version
krystofwoldrich Nov 28, 2023
4a27dcd
fix e2e build test 0.65 node version
krystofwoldrich Nov 28, 2023
961a9b0
Keep node 18 for SDK build, bump down for app build
krystofwoldrich Nov 28, 2023
c1626f0
Remove hermes from cocoa tester as no engine is needed
krystofwoldrich Nov 28, 2023
31293a0
Merge branch 'main' into kw-rn-0-73
krystofwoldrich Dec 12, 2023
9d76205
bump to 0.73.0 stable release
krystofwoldrich Dec 12, 2023
98f912a
Apply suggestions from code review
krystofwoldrich Dec 12, 2023
9bcd0dd
chore(internal): Use new DSN after leaked token
krystofwoldrich Jan 5, 2024
34f148f
Merge branch 'kw-new-dsn' into kw-rn-0-73
krystofwoldrich Jan 5, 2024
0e78db6
Merge remote-tracking branch 'origin/main' into kw-rn-0-73
krystofwoldrich Jan 5, 2024
36f25b0
chore(internal): Update e2e tests driver
krystofwoldrich Jan 8, 2024
80d5b84
chore(rn): Update repository to RN 0.73.2
krystofwoldrich Jan 9, 2024
b46ebf8
Merge branch 'kw-update-rn-0-73-2' into kw-bump-e2e-tests-deps
krystofwoldrich Jan 9, 2024
1eef7e1
Merge branch 'main' into kw-bump-e2e-tests-deps
krystofwoldrich Mar 18, 2024
2efa751
fix fetch
krystofwoldrich Mar 18, 2024
df83029
bump e2e tests runner to node 20 to fix jest SIGSEGV
krystofwoldrich Mar 18, 2024
37b7171
fix lint
krystofwoldrich Mar 18, 2024
b8bd80f
fix yarn lock
krystofwoldrich Mar 18, 2024
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
8 changes: 1 addition & 7 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -492,14 +492,8 @@ jobs:
run: tar -xvf *.tar

- uses: actions/setup-node@v4
if: ${{ matrix.rn-version == '0.65.3' }}
with:
node-version: 18

- uses: actions/setup-node@v4
if: ${{ matrix.rn-version != '0.65.3' }}
with:
node-version: 18
node-version: 20

- uses: actions/setup-java@v3
with:
Expand Down
14 changes: 7 additions & 7 deletions test/e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
"main": "dist/index.js",
"scripts": {
"build": "tsc --project tsconfig.build.json",
"test": "jest"
"test": "NODE_OPTIONS=--experimental-vm-modules jest"
},
"license": "MIT",
"devDependencies": {
"@babel/preset-env": "^7.20.2",
"@babel/preset-typescript": "^7.18.6",
"appium": "^2.0.0-beta.46",
"appium-uiautomator2-driver": "^2.12.1",
"appium-xcuitest-driver": "^4.16.6",
"babel-jest": "^29.3.1",
"jest": "^29.3.1",
"appium": "^2.4.1",
"appium-uiautomator2-driver": "^2.39.0",
"appium-xcuitest-driver": "^5.13.0",
"babel-jest": "^29.7.0",
"jest": "^29.7.0",
"typescript": "4.1.3",
"webdriverio": "7.26.0"
"webdriverio": "^8.27.0"
}
}
22 changes: 11 additions & 11 deletions test/e2e/test/utils/fetchEvent.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type { Event } from '@sentry/types';
import fetch, { Request } from 'node-fetch';
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fetch is in Node.JS since v18


const domain = 'sentry.io';
const eventEndpoint = '/api/0/projects/sentry-sdks/sentry-react-native/events/';
Expand All @@ -20,16 +19,17 @@ const fetchEvent = async (eventId: string): Promise<ApiEvent> => {
expect(process.env.SENTRY_AUTH_TOKEN).toBeDefined();
expect(process.env.SENTRY_AUTH_TOKEN?.length).toBeGreaterThan(0);

const request = new Request(url, {
headers: {
Authorization: `Bearer ${process.env.SENTRY_AUTH_TOKEN}`,
'Content-Type': 'application/json',
},
method: 'GET',
});
const request = () =>
fetch(url, {
headers: {
Authorization: `Bearer ${process.env.SENTRY_AUTH_TOKEN}`,
'Content-Type': 'application/json',
},
method: 'GET',
});

let retries = 0;
const retryer = (jsonResponse: any) =>
const retryer: (json: any) => Promise<ApiEvent> = (jsonResponse: any) =>
new Promise((resolve, reject) => {
if (jsonResponse.detail === 'Event not found') {
if (retries < RETRY_COUNT) {
Expand All @@ -38,7 +38,7 @@ const fetchEvent = async (eventId: string): Promise<ApiEvent> => {
// eslint-disable-next-line no-console
console.log(`Retrying api request. Retry number: ${retries}`);
resolve(
fetch(request)
request()
.then(res => res.json())
.then(retryer),
);
Expand All @@ -51,7 +51,7 @@ const fetchEvent = async (eventId: string): Promise<ApiEvent> => {
}
});

const json: ApiEvent = (await fetch(request)
const json: ApiEvent = (await request()
// tslint:disable-next-line: no-unsafe-any
.then(res => res.json())
.then(retryer)) as ApiEvent;
Expand Down
Loading
Loading