handle client not supporting show Message Request with try and catch … #78
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Contextive VSCode Extension | |
on: | |
push: | |
paths: | |
- '**LanguageServer**' | |
- '**vscode**' | |
- '**Core**' | |
- '.github/**vscode**' | |
env: | |
dotnet-version: '7.0.x' | |
CONTEXTIVE_DEBUG: true | |
jobs: | |
build-and-test: | |
name: 'Build and Test' | |
strategy: | |
matrix: | |
include: | |
- dotnet_runtime: win-x64 | |
vsce_platform: win32-x64 | |
os: windows-latest | |
- dotnet_runtime: linux-x64 | |
vsce_platform: linux-x64 | |
os: ubuntu-latest | |
runs-on: ${{ matrix.os }} | |
steps: | |
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." | |
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" | |
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." | |
- run: echo "🖥️ The workflow is now ready to test your code on the runner." | |
- name: Setup .NET Core SDK ${{ env.dotnet-version }} | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: ${{ env.dotnet-version }} | |
- name: Display dotnet version | |
run: dotnet --version | |
- name: Install Fable | |
run: dotnet tool install fable --global | |
- name: Install paket | |
run: dotnet tool install paket --global | |
- name: Restore paket dependencies | |
run: paket restore | |
working-directory: ./src | |
- name: Build and Test Core | |
run: | | |
dotnet test ./src/core/Contextive.Core.Tests/Contextive.Core.Tests.fsproj --logger "trx;LogFileName=TestResults.Core-${{ env.dotnet-version }}-${{ runner.os }}.xml" -- Expecto.fail-on-focused-tests=true | |
- name: Build and Test Language Server | |
run: | | |
dotnet test ./src/language-server/Contextive.LanguageServer.Tests/Contextive.LanguageServer.Tests.fsproj --logger "trx;LogFileName=TestResults.LanguageServer-${{ env.dotnet-version }}-${{ runner.os }}.xml" -- Expecto.fail-on-focused-tests=true | |
- name: Upload Language Server Test Results | |
uses: actions/upload-artifact@v3 | |
with: | |
name: language-server-results-${{ env.dotnet-version }}-${{ runner.os }} | |
path: "src/**/Contextive.*.Tests/TestResults/TestResults.*-${{ env.dotnet-version }}-${{ runner.os }}.xml" | |
if: always() | |
- name: Test Report | |
uses: dorny/test-reporter@v1 | |
if: always() | |
with: | |
name: Language Server Tests ${{ runner.os }} | |
path: "src/**/Contextive.*.Tests/TestResults/TestResults.*-${{ env.dotnet-version }}-${{ runner.os }}.xml" | |
reporter: dotnet-trx | |
- name: Restore npm dependencies | |
run: npm install | |
working-directory: ./src/vscode/contextive | |
if: runner.os == 'Linux' | |
- run: echo "🍏 This job's status is ${{ job.status }}." | |
- name: Start xvfb | |
run: | | |
/usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & | |
echo ">>> Started xvfb" | |
if: runner.os == 'Linux' | |
- name: Build and Test VsCode Extension | |
run: npm test | |
working-directory: ./src/vscode/contextive | |
env: | |
DISPLAY: ":99.0" | |
DOTNET_VERSION: ${{ env.dotnet-version }} | |
if: runner.os == 'Linux' | |
- name: Upload VsCode Extension Test Results | |
uses: actions/upload-artifact@v3 | |
with: | |
name: vscode-extension-test-results-${{ env.dotnet-version }}-${{ runner.os }} | |
path: "src/vscode/**/TestResults-*-${{ env.dotnet-version }}-${{ runner.os }}.xml" | |
if: always() && runner.os == 'Linux' | |
- name: Upload All Test Logs | |
uses: actions/upload-artifact@v3 | |
with: | |
name: vscode-extension-logs-${{ env.dotnet-version }}-${{ runner.os }} | |
path: "**/log*.txt" | |
if: always() && runner.os == 'Linux' | |
- name: Test Report | |
uses: dorny/test-reporter@v1 | |
if: always() && runner.os == 'Linux' | |
with: | |
name: VsCode Extension Tests ${{ runner.os }} | |
path: "src/vscode/**/TestResults-*-${{ env.dotnet-version }}-${{ runner.os }}.xml" | |
reporter: java-junit | |
- run: echo "🍏 This job's status is ${{ job.status }}." |