Skip to content

Commit

Permalink
Publish test results
Browse files Browse the repository at this point in the history
  • Loading branch information
fredimachado committed May 28, 2024
1 parent ca31756 commit efd6396
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 3 deletions.
1 change: 0 additions & 1 deletion .github/workflows/admin-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ jobs:
--results-directory ${{github.workspace}}/TestResults --blame \
--logger console --logger trx --logger html \
--logger "GitHubActions;summary.includePassedTests=true;summary.includeSkippedTests=true" \
'/p:CollectCoverage=true;CoverletOutputFormat="json,lcov,cobertura";MergeWith=${{github.workspace}}/TestResults/coverage.json;CoverletOutput=${{github.workspace}}/TestResults/coverage' \
-- RunConfiguration.CollectSourceInformation=true
- name: Upload Test Results
Expand Down
17 changes: 16 additions & 1 deletion .github/workflows/barista-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,22 @@ jobs:
run: dotnet restore

- name: Test
run: dotnet test --results-directory ./testresults --logger "trx;LogFileName=test_results.xml" /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:CoverletOutput=./testresults/coverage/ ../**.Tests/**.csproj
id: test
# Note that the space after the last double dash (--) is intentional
run: >
dotnet test ../**.Tests/**.csproj
--logger console --logger trx --logger html
--logger "GitHubActions;summary.includePassedTests=true;summary.includeSkippedTests=true"
--results-directory ${{github.workspace}}/TestResults --blame
--
RunConfiguration.CollectSourceInformation=true
- name: Upload Test Results
if: (success() || steps.test.conclusion == 'failure')
uses: actions/upload-artifact@v4
with:
name: TestResults
path: ${{github.workspace}}/TestResults

- name: Build
run: dotnet build -c Release --no-restore /p:CopyLocalLockFileAssemblies=true
Expand Down
18 changes: 17 additions & 1 deletion .github/workflows/cashier-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,23 @@ jobs:
run: dotnet build -c Release --no-restore /p:CopyLocalLockFileAssemblies=true

- name: Test
run: dotnet test ../../../NCafe.sln --results-directory ./testresults --logger "trx;LogFileName=test_results.xml" /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:CoverletOutput=./testresults/coverage/
id: test
# Note that the space after the last double dash (--) is intentional
run: >
dotnet test ../../../NCafe.sln
--logger console --logger trx --logger html
--logger "GitHubActions;summary.includePassedTests=true;summary.includeSkippedTests=true"
--results-directory ${{github.workspace}}/TestResults --blame
'/p:CollectCoverage=true;CoverletOutputFormat="json,lcov,cobertura";MergeWith=${{github.workspace}}/TestResults/coverage.json;CoverletOutput=${{github.workspace}}/TestResults/coverage' \
--
RunConfiguration.CollectSourceInformation=true
- name: Upload Test Results
if: (success() || steps.test.conclusion == 'failure')
uses: actions/upload-artifact@v4
with:
name: TestResults
path: ${{github.workspace}}/TestResults

- name: Publish
run: dotnet publish -c Release --no-restore --no-build -o ./output
Expand Down

0 comments on commit efd6396

Please sign in to comment.