Skip to content

Commit 0ba4fd9

Browse files
committed
trying stderr - or is this erroring in CI
1 parent e01dca7 commit 0ba4fd9

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

dev-packages/e2e-tests/lib/getTestMatrix.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,15 @@ function run(): void {
5050

5151
// For GitHub Action debugging
5252
// eslint-disable-next-line no-console
53-
console.log(`Parsed command line arguments: base=${base}, head=${head}, optional=${optional}`);
53+
console.error(`Parsed command line arguments: base=${base}, head=${head}, optional=${optional}`);
5454

5555
const testApplications = globSync('*/package.json', {
5656
cwd: `${__dirname}/../test-applications`,
5757
}).map(filePath => dirname(filePath));
5858

59-
// For GitHub Action debugging
59+
// For GitHub Action debugging (using stderr the 'matrix=...' output is not polluted)
6060
// eslint-disable-next-line no-console
61-
console.log(
61+
console.error(
6262
`Discovered ${testApplications.length} test applications${
6363
testApplications.length > 0
6464
? ` (sample: ${JSON.stringify(testApplications.slice(0, 10))}${testApplications.length > 10 ? ' …' : ''})`
@@ -166,7 +166,7 @@ function getAffectedTestApplications(
166166

167167
// For GitHub Action debugging
168168
// eslint-disable-next-line no-console
169-
console.log('Nx affected projects:', JSON.stringify(affectedProjects));
169+
console.error(`Nx affected projects: ${JSON.stringify(affectedProjects)}`);
170170

171171
// If something in e2e tests themselves are changed, check if only test applications were changed
172172
if (affectedProjects.includes('@sentry-internal/e2e-tests')) {
@@ -176,15 +176,15 @@ function getAffectedTestApplications(
176176
// Shared code was changed, run all tests
177177
if (changedTestApps === false) {
178178
// eslint-disable-next-line no-console
179-
console.log('Shared e2e code changed. Running all test applications.');
179+
console.error('Shared e2e code changed. Running all test applications.');
180180
return testApplications;
181181
}
182182

183183
// Only test applications that were changed, run selectively
184184
if (changedTestApps.size > 0) {
185185
const selected = testApplications.filter(testApp => changedTestApps.has(testApp));
186186
// eslint-disable-next-line no-console
187-
console.log(
187+
console.error(
188188
`Only changed test applications will run (${selected.length}): ${JSON.stringify(Array.from(changedTestApps))}`,
189189
);
190190
return selected;
@@ -216,7 +216,7 @@ function getChangedTestApps(base: string, head?: string): false | Set<string> {
216216

217217
// For GitHub Action debugging
218218
// eslint-disable-next-line no-console
219-
console.log(`Changed files since ${base}${head ? `..${head}` : ''}:`, JSON.stringify(changedFiles));
219+
console.error(`Changed files since ${base}${head ? `..${head}` : ''}: ${JSON.stringify(changedFiles)}`);
220220

221221
const changedTestApps: Set<string> = new Set();
222222
const testAppsPrefix = 'dev-packages/e2e-tests/test-applications/';

0 commit comments

Comments
 (0)