diff options
-rw-r--r-- | .github/workflows/main.yaml | 20 | ||||
-rw-r--r-- | extension/src/test-runner/runTestOnVSCodeHost.ts | 5 |
2 files changed, 24 insertions, 1 deletions
diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 4f1e538c..8249b576 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -14,6 +14,8 @@ jobs: runs-on: ${{ matrix.os }} steps: + # Install Python requirements and build+upload binaries for each platform + - name: Check-out repository uses: actions/checkout@v3 @@ -55,6 +57,8 @@ jobs: - name: Checkout uses: actions/checkout@v2 + # Download corresponding binary artifact for the platform + - name: Create exe directory run: | mkdir extension/server/exe @@ -80,6 +84,8 @@ jobs: path: extension/server/exe/windows if: matrix.os == 'windows-latest' + # Setup Node.js and install dependencies + - name: Use Node.js 19.0.0 uses: actions/setup-node@v3 with: @@ -107,16 +113,26 @@ jobs: cd extension/react-app npm ci --legacy-peer-deps + # Run tests + - name: Package the extension run: | cd extension npm run package + - name: Install Xvfb for Linux + run: | + sudo apt-get install -y xvfb # Install Xvfb + Xvfb :99 & # Start Xvfb + export DISPLAY=:99 # Export the display number to the environment + if: matrix.os == 'ubuntu-20.04' + - name: Run extension tests run: | cd extension npm run test + # Package again and build+upload the .vsix - name: Remove exe directory and re-package run: | cd extension @@ -137,6 +153,8 @@ jobs: contents: write steps: + # Checkout and download .vsix artifact + - name: Checkout uses: actions/checkout@v2 @@ -146,6 +164,8 @@ jobs: name: vsix-artifact path: extension/build + # Publish the extension and commit/push the version change + - name: Publish run: | cd extension diff --git a/extension/src/test-runner/runTestOnVSCodeHost.ts b/extension/src/test-runner/runTestOnVSCodeHost.ts index 2a542ffc..21267c2d 100644 --- a/extension/src/test-runner/runTestOnVSCodeHost.ts +++ b/extension/src/test-runner/runTestOnVSCodeHost.ts @@ -11,7 +11,10 @@ async function main() { // The path to test runner // Passed to --extensionTestsPath - const extensionTestsPath = path.resolve(extensionDevelopmentPath, "out/test-runner/mochaRunner"); + const extensionTestsPath = path.resolve( + extensionDevelopmentPath, + "out/test-runner/mochaRunner" + ); // Download VS Code, unzip it and run the integration test await runTests({ extensionDevelopmentPath, extensionTestsPath }); |