-
-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated test workflow with code coverage summary
- Loading branch information
1 parent
e53e04a
commit f3e4754
Showing
2 changed files
with
26 additions
and
6 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,24 +31,39 @@ env: | |
jobs: | ||
build: | ||
if: ${{ !github.event_name == 'pull_request' || !github.event.pull_request.draft }} | ||
runs-on: windows-latest | ||
runs-on: linux-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: ${{ env.DOTNET_VERSION }} | ||
|
||
- uses: microsoft/setup-msbuild@v1 | ||
|
||
- name: Test Packages | ||
run: dotnet test --configuration Release | ||
if: ${{ github.ref != 'refs/heads/main' && github.event_name != 'push' }} | ||
run: dotnet test --configuration Release --verbosity normal --collect:"XPlat Code Coverage" --results-directory ./coverage | ||
env: | ||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
OPENAI_ORGANIZATION_ID: ${{ secrets.OPENAI_ORGANIZATION_ID }} | ||
|
||
- name: Code Coverage Summary Report | ||
if: ${{ github.ref != 'refs/heads/main' && github.event_name != 'push' }} | ||
uses: irongut/[email protected] | ||
with: | ||
filename: 'coverage/*/coverage.cobertura.xml' | ||
badge: true | ||
format: 'markdown' | ||
output: 'both' | ||
|
||
- name: Write Coverage Job Summary | ||
if: ${{ github.ref != 'refs/heads/main' && github.event_name != 'push' }} | ||
run: cat code-coverage-results.md >> $GITHUB_STEP_SUMMARY | ||
|
||
- name: Build Pack and Publish NuGet Package | ||
run: | | ||
$projectPath = "${{ github.workspace }}\OpenAI-DotNet" | ||
|
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