Skip to content

experiment: testing vscode pipeline with on push trigger until it's o… #105

experiment: testing vscode pipeline with on push trigger until it's o…

experiment: testing vscode pipeline with on push trigger until it's o… #105

name: Contextive VSCode Extension
on:
# temporary, for testing on branch
push:
paths:
- 'src/**'
- '.github/**'
# long term
workflow_run:
workflows: [Contextive Language Server]
types:
- completed
env:
dotnet-version: '7.0.x'
dotnet_runtime: linux-x64
vsce_platform: linux-x64
os: ubuntu-latest
# Uncomment this to ensure the vscode extension tests run in debug mode using `dotnet run` for enhanced logging
# by default we test with the release mode built binary to ensure .NET trimming hasn't broken anything
# See https://github.com/dev-cycles/contextive/issues/61 for details
# CONTEXTIVE_DEBUG: true
jobs:
build-and-test:
name: 'Build and Test'
runs-on: ubuntu-latest
# uncomment after finished branch testing
# if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
- uses: ./.github/actions/init-dotnet
- name: Build
run: dotnet fsi vscode/build.fsx
working-directory: src
# - 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: Copy Published Language Server to VsCode Extension
# run: |
# mkdir -p src/vscode/contextive/dist && cp src/language-server/Contextive.LanguageServer/publish/Contextive.LanguageServer "$_"
# 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'
# timeout-minutes: 5
# - 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 }}."