Skip to content

Commit e4861f1

Browse files
committed
fix: improve e2e test CI environment compatibility
1 parent d7c3fd0 commit e4861f1

File tree

5 files changed

+17
-4
lines changed

5 files changed

+17
-4
lines changed

.cursor/rules/ts-rules.mdc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ The application we are working on uses the following tech stack:
110110
- Include elaborate details in the body of the commit message
111111
- Always follow the conventional commit message format
112112
- Add two newlines after the commit message title
113+
- Do not ever commit and push without asking for consent from the user
113114

114115
## When to create a class
115116

.github/workflows/e2e-tests.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,13 @@ jobs:
5959
run: npx playwright install --with-deps chromium
6060

6161
- name: Run E2E tests
62-
run: npm run test:e2e
62+
run: |
63+
echo "🧪 Starting e2e tests..."
64+
echo "Environment variables:"
65+
echo " CI: $CI"
66+
echo " RUNNER_TEMP: $RUNNER_TEMP"
67+
echo " TMPDIR: $TMPDIR"
68+
npm run test:e2e
6369
env:
6470
CI: true
6571
DEBUG: pw:webserver

e2e-tests/playwright.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export default defineConfig({
4242
'--enable-logging=stderr',
4343
'--log-level=0',
4444
'--v=1',
45-
...(process.env.DEBUG_MODE
45+
...(process.env.CI || process.env.DEBUG_MODE
4646
? ['--no-sandbox', '--disable-dev-shm-usage']
4747
: []),
4848
],

e2e-tests/test-server.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ async function startTestServer() {
1717
'../packages/apex-lsp-vscode-extension',
1818
);
1919
const workspacePath = process.env.CI
20-
? path.join(process.env.TMPDIR || '/tmp', 'apex-e2e-workspace')
20+
? path.join(
21+
process.env.RUNNER_TEMP || process.env.TMPDIR || '/tmp',
22+
'apex-e2e-workspace',
23+
)
2124
: path.resolve(__dirname, './test-workspace');
2225

2326
// Verify paths exist

e2e-tests/utils/setup.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,10 @@ export async function setupTestWorkspace(
4646
const workspacePath =
4747
customWorkspacePath ||
4848
(process.env.CI
49-
? path.join(process.env.TMPDIR || '/tmp', 'apex-e2e-workspace')
49+
? path.join(
50+
process.env.RUNNER_TEMP || process.env.TMPDIR || '/tmp',
51+
'apex-e2e-workspace',
52+
)
5053
: path.resolve(__dirname, '../test-workspace'));
5154

5255
// Ensure workspace directory exists

0 commit comments

Comments
 (0)