Skip to content

Commit 899d85d

Browse files
committed
Upload code coverage in the insiders build
1 parent 96fb4a3 commit 899d85d

File tree

1 file changed

+21
-5
lines changed

1 file changed

+21
-5
lines changed

.github/workflows/insiders.yml

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ env:
1515
VSIX_NAME: ms-python-insiders.vsix
1616
COVERAGE_REPORTS: tests-coverage-reports
1717
TEST_RESULTS_DIRECTORY: .
18+
# Force a path with spaces and to test extension works in these scenarios
19+
# Unicode characters are causing 2.7 failures so skip that for now.
20+
special-working-directory: './path with spaces'
21+
special-working-directory-relative: 'path with spaces'
1822

1923
jobs:
2024
build-vsix:
@@ -454,9 +458,14 @@ jobs:
454458
runs-on: ubuntu-latest
455459
if: github.repository == 'microsoft/vscode-python'
456460
needs: [tests, smoke-tests]
461+
defaults:
462+
run:
463+
working-directory: ${{env.special-working-directory}}
457464
steps:
458465
- name: Checkout
459466
uses: actions/checkout@v2
467+
with:
468+
path: ${{env.special-working-directory-relative}}
460469

461470
- name: Use Node ${{env.NODE_VERSION}}
462471
uses: actions/[email protected]
@@ -472,24 +481,31 @@ jobs:
472481
- name: Download Ubuntu test coverage artifacts
473482
uses: actions/download-artifact@v2
474483
with:
475-
name: Linux-${{env.COVERAGE_REPORTS}}
476-
path: Linux-${{env.COVERAGE_REPORTS}}
484+
name: Linux-${{ env.COVERAGE_REPORTS }}
485+
path: ${{env.special-working-directory}}/Linux-${{ env.COVERAGE_REPORTS }}
477486

478487
- name: Extract Ubuntu coverage artifacts to ./nyc_output
479488
run: |
480489
mkdir .nyc_output
481-
mv Linux-${{env.COVERAGE_REPORTS}}/* .nyc_output
482-
rm -r Linux-${{env.COVERAGE_REPORTS}}
490+
mv Linux-${{ env.COVERAGE_REPORTS }}/* .nyc_output
491+
rm -r Linux-${{ env.COVERAGE_REPORTS }}
483492
484493
- name: Generate coverage reports
485494
run: npm run test:cover:report
486495
continue-on-error: true
487496

497+
# The only location supported by the codecov action is the workspace root.
498+
# See https://github.com/codecov/codecov-action#arguments
499+
- name: Move codecov.yml to root
500+
run: |
501+
mkdir $GITHUB_WORKSPACE/.github
502+
mv .github/codecov.yml $GITHUB_WORKSPACE
503+
488504
- name: Upload coverage to codecov
489505
uses: codecov/codecov-action@v1
490506
with:
491507
token: ${{ secrets.CODECOV_TOKEN }}
492-
file: ./coverage/cobertura-coverage.xml
508+
file: ${{env.special-working-directory}}/coverage/cobertura-coverage.xml
493509

494510
upload:
495511
name: Upload VSIX to Azure Blob Storage

0 commit comments

Comments
 (0)