Skip to content

Commit abf9a5e

Browse files
authored
Try running tests with space in root path (#14113)
* Add test with a space (only works on flake) * Push to insiders.yml only * Remove test that doesn't really do anything * REmove unused bits * Change path to have unicode too * Get test to run * Set root path differently * Valid dir * A different way * Another way * Try creating the directory first * Another try * Only one env * Pass parameters correctly * Try without unicode * Set working directory directly on xvfb actions * Working-directory not workingDirectory * Cached ts files output * Remove test with space branch for insiders
1 parent f3f26aa commit abf9a5e

File tree

1 file changed

+20
-7
lines changed

1 file changed

+20
-7
lines changed

.github/workflows/insiders.yml

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,19 @@ jobs:
120120
name: Tests
121121
# The value of runs-on is the OS of the current job (specified in the strategy matrix below) instead of being hardcoded.
122122
runs-on: ${{ matrix.os }}
123+
env:
124+
# Something in Node 12.16.0 breaks the TS debug adapter, and ubuntu-latest bundles Node 12.16.1.
125+
# We can remove this when we switch over to the python-based DA in https://github.com/microsoft/vscode-python/issues/7136.
126+
# See https://github.com/microsoft/ptvsd/issues/2068
127+
# At this point pinning is only needed for consistency. We no longer have TS debug adapter.
128+
NODE_VERSION: 12.15.0
129+
# Force a path with spaces and to test extension works in these scenarios
130+
# Unicode characters are causing 2.7 failures so skip that for now.
131+
special-working-directory: './path with spaces'
132+
special-working-directory-relative: 'path with spaces'
133+
defaults:
134+
run:
135+
working-directory: ${{env.special-working-directory}}
123136
if: github.repository == 'microsoft/vscode-python'
124137
strategy:
125138
fail-fast: false
@@ -130,15 +143,11 @@ jobs:
130143
# Run the tests on the oldest and most recent versions of Python.
131144
python: [2.7, 3.8]
132145
test-suite: [ts-unit, python-unit, venv, single-workspace, multi-workspace, debugger, functional]
133-
env:
134-
# Something in Node 12.16.0 breaks the TS debug adapter, and ubuntu-latest bundles Node 12.16.1.
135-
# We can remove this when we switch over to the python-based DA in https://github.com/microsoft/vscode-python/issues/7136.
136-
# See https://github.com/microsoft/ptvsd/issues/2068
137-
# At this point pinning is only needed for consistency. We no longer have TS debug adapter.
138-
NODE_VERSION: 12.15.0
139146
steps:
140147
- name: Checkout
141148
uses: actions/checkout@v2
149+
with:
150+
path: ${{env.special-working-directory-relative}}
142151

143152
- name: Cache pip files
144153
uses: actions/cache@v2
@@ -157,7 +166,7 @@ jobs:
157166
id: out-cache
158167
uses: actions/cache@v2
159168
with:
160-
path: ./out
169+
path: ${{env.special-working-directory}}/out
161170
key: ${{runner.os}}-${{env.CACHE_OUT_DIRECTORY}}-${{hashFiles('src/**')}}
162171

163172
- name: Install dependencies (npm ci)
@@ -315,6 +324,7 @@ jobs:
315324
uses: GabrielBB/[email protected]
316325
with:
317326
run: npm run testSingleWorkspace
327+
working-directory: ${{env.special-working-directory}}
318328
if: matrix.test-suite == 'venv'
319329

320330
- name: Run single-workspace tests
@@ -323,6 +333,7 @@ jobs:
323333
uses: GabrielBB/[email protected]
324334
with:
325335
run: npm run testSingleWorkspace
336+
working-directory: ${{env.special-working-directory}}
326337
if: matrix.test-suite == 'single-workspace'
327338

328339
- name: Run multi-workspace tests
@@ -331,6 +342,7 @@ jobs:
331342
uses: GabrielBB/[email protected]
332343
with:
333344
run: npm run testMultiWorkspace
345+
working-directory: ${{env.special-working-directory}}
334346
if: matrix.test-suite == 'multi-workspace'
335347

336348
- name: Run debugger tests
@@ -339,6 +351,7 @@ jobs:
339351
uses: GabrielBB/[email protected]
340352
with:
341353
run: npm run testDebugger
354+
working-directory: ${{env.special-working-directory}}
342355
if: matrix.test-suite == 'debugger'
343356

344357
- name: Run functional tests

0 commit comments

Comments
 (0)