Skip to content

Commit

Permalink
experiment: move report uploading to custom action
Browse files Browse the repository at this point in the history
  • Loading branch information
chrissimon-au committed Nov 22, 2023
1 parent 9c2aebc commit c077920
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 20 deletions.
4 changes: 2 additions & 2 deletions .github/actions/init-dotnet/action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: 'Init Dotnet Workflow'
name: Init Dotnet Workflow
runs:
using: "composite"
using: composite
steps:
- name: Setup .NET SDK ${{ env.DOTNET_VERSION }}
uses: actions/setup-dotnet@v3
Expand Down
17 changes: 17 additions & 0 deletions .github/actions/upload-reports/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Upload Logs & Artifacts
runs:
using: composite
steps:
- name: Upload Language Server Test Results
uses: actions/upload-artifact@v3
with:
name: language-server-test-results-net${{ 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 (net${{ env.DOTNET_VERSION }} - ${{ runner.os }})
path: "src/**/Contextive.*.Tests/TestResults/TestResults.*-${{ env.DOTNET_VERSION }}-${{ runner.os }}.xml"
reporter: dotnet-trx
20 changes: 2 additions & 18 deletions .github/workflows/contextive-languageserver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@ on:
- '.github/**'
env:
DOTNET_VERSION: '7.0.x'

# 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'
Expand All @@ -28,22 +23,11 @@ jobs:
- uses: actions/checkout@v3
with:
persist-credentials: false

- uses: ./.github/actions/init-dotnet

- name: Build
run: dotnet fsi language-server/build.fsx -- -r ${{ matrix.dotnet_runtime }}
working-directory: src

- name: Upload Language Server Test Results
uses: actions/upload-artifact@v3
with:
name: language-server-test-results-net${{ 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 (net${{ env.DOTNET_VERSION }} - ${{ runner.os }})
path: "src/**/Contextive.*.Tests/TestResults/TestResults.*-${{ env.DOTNET_VERSION }}-${{ runner.os }}.xml"
reporter: dotnet-trx
- uses: ./.github/actions/upload-reports

0 comments on commit c077920

Please sign in to comment.