Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: End-to-End Tests
name: End-to-End Tests V2

on:
push:
Expand Down
41 changes: 30 additions & 11 deletions dev-packages/e2e-tests/cli.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -234,16 +234,35 @@ if (actions.includes('test')) {
if (!sentryAuthToken) {
console.log('Skipping maestro test due to unavailable or empty SENTRY_AUTH_TOKEN');
} else {
execSync(
`maestro test maestro \
--env=APP_ID="${appId}" \
--env=SENTRY_AUTH_TOKEN="${sentryAuthToken}" \
--debug-output maestro-logs \
--flatten-debug-output`,
{
stdio: 'inherit',
cwd: e2eDir,
},
);
try {
execSync(
`maestro test maestro \
--env=APP_ID="${appId}" \
--env=SENTRY_AUTH_TOKEN="${sentryAuthToken}" \
--debug-output maestro-logs \
--flatten-debug-output`,
{
stdio: 'inherit',
cwd: e2eDir,
},
);
} finally {
// Always redact sensitive data, even if the test fails
const redactScript = `
if [[ "$(uname)" == "Darwin" ]]; then
find ./maestro-logs -type f -exec sed -i '' "s/${sentryAuthToken}/[REDACTED]/g" {} +
echo 'Redacted sensitive data from logs on MacOS'
else
find ./maestro-logs -type f -exec sed -i "s/${sentryAuthToken}/[REDACTED]/g" {} +
echo 'Redacted sensitive data from logs on Ubuntu'
fi
`;

try {
execSync(redactScript, { stdio: 'inherit', cwd: e2eDir, shell: '/bin/bash' });
} catch (error) {
console.warn('Failed to redact sensitive data from logs:', error.message);
}
}
}
}
Loading