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

Try running tests with space in root path #14113

Merged
merged 20 commits into from
Oct 6, 2020
Merged
Changes from 18 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
28 changes: 21 additions & 7 deletions .github/workflows/insiders.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- main
- rchiodo/test_with_space
Copy link
Author

Choose a reason for hiding this comment

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

This is temporary. The rest of this should be forcing a path with spaces in it though.


env:
PYTHON_VERSION: 3.8
Expand Down Expand Up @@ -120,6 +121,19 @@ jobs:
name: Tests
# The value of runs-on is the OS of the current job (specified in the strategy matrix below) instead of being hardcoded.
runs-on: ${{ matrix.os }}
env:
# Something in Node 12.16.0 breaks the TS debug adapter, and ubuntu-latest bundles Node 12.16.1.
# We can remove this when we switch over to the python-based DA in https://github.com/microsoft/vscode-python/issues/7136.
# See https://github.com/microsoft/ptvsd/issues/2068
# At this point pinning is only needed for consistency. We no longer have TS debug adapter.
NODE_VERSION: 12.15.0
# Force a path with spaces and to test extension works in these scenarios
# Unicode characters are causing 2.7 failures so skip that for now.
special-working-directory: './path with spaces'
special-working-directory-relative: 'path with spaces'
Comment on lines +131 to +132

Choose a reason for hiding this comment

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

What is the benefit of having a separate './path with spaces' env variable, instead of using 'path with spaces' everywhere?

Copy link
Author

Choose a reason for hiding this comment

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

So I don't mess up with the name. Just a variable replacement.

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
special-working-directory: './path with spaces'
special-working-directory-relative: 'path with spaces'
special-working-directory: './path with 🌌s'
special-working-directory-relative: 'path with 🌌s'

If we want to do some Unicode path and spaces, this might help?

Choose a reason for hiding this comment

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

Why not use env.special-working-directory-relative everywhere, instead of having env.special-working-directory and env.special-working-directory-relative?

Copy link
Author

Choose a reason for hiding this comment

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

Cause they're different? I wasn't sure how to concat a string in the yaml file so I just made to variables.

Copy link
Member

Choose a reason for hiding this comment

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

Adding something with Unicode like Karthik suggested is probably a good idea.

defaults:
run:
working-directory: ${{env.special-working-directory}}
kimadeline marked this conversation as resolved.
Show resolved Hide resolved
if: github.repository == 'microsoft/vscode-python'
strategy:
fail-fast: false
Expand All @@ -130,15 +144,11 @@ jobs:
# Run the tests on the oldest and most recent versions of Python.
python: [2.7, 3.8]
test-suite: [ts-unit, python-unit, venv, single-workspace, multi-workspace, debugger, functional]
env:
# Something in Node 12.16.0 breaks the TS debug adapter, and ubuntu-latest bundles Node 12.16.1.
# We can remove this when we switch over to the python-based DA in https://github.com/microsoft/vscode-python/issues/7136.
# See https://github.com/microsoft/ptvsd/issues/2068
# At this point pinning is only needed for consistency. We no longer have TS debug adapter.
NODE_VERSION: 12.15.0
steps:
- name: Checkout
uses: actions/checkout@v2
with:
path: ${{env.special-working-directory-relative}}

- name: Cache pip files
uses: actions/cache@v2
Expand All @@ -157,7 +167,7 @@ jobs:
id: out-cache
uses: actions/cache@v2
with:
path: ./out
path: ${{env.special-working-directory}}/out
key: ${{runner.os}}-${{env.CACHE_OUT_DIRECTORY}}-${{hashFiles('src/**')}}

- name: Install dependencies (npm ci)
Expand Down Expand Up @@ -315,6 +325,7 @@ jobs:
uses: GabrielBB/xvfb-action@v1.4
with:
run: npm run testSingleWorkspace
working-directory: ${{env.special-working-directory}}
if: matrix.test-suite == 'venv'

- name: Run single-workspace tests
Expand All @@ -323,6 +334,7 @@ jobs:
uses: GabrielBB/xvfb-action@v1.4
with:
run: npm run testSingleWorkspace
working-directory: ${{env.special-working-directory}}
if: matrix.test-suite == 'single-workspace'

- name: Run multi-workspace tests
Expand All @@ -331,6 +343,7 @@ jobs:
uses: GabrielBB/xvfb-action@v1.4
with:
run: npm run testMultiWorkspace
working-directory: ${{env.special-working-directory}}
if: matrix.test-suite == 'multi-workspace'

- name: Run debugger tests
Expand All @@ -339,6 +352,7 @@ jobs:
uses: GabrielBB/xvfb-action@v1.4
with:
run: npm run testDebugger
working-directory: ${{env.special-working-directory}}
if: matrix.test-suite == 'debugger'

- name: Run functional tests
Expand Down