feat: port junit logger. #179
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: .NET | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
env: | |
APP_BUILD_VERSION: ${{ format('4.0.{0}', github.run_number) }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup .NET 8.0 | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 8.x | |
- name: Setup .NET 3.1.x | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: "3.1.x" | |
- name: Package (debug) | |
run: dotnet pack -p:PackageVersion=${{ env.APP_BUILD_VERSION }} | |
- name: Package (release) | |
run: dotnet pack -c Release -p:PackageVersion=${{ env.APP_BUILD_VERSION }} | |
- name: Unit test | |
run: | | |
dotnet test -p:PackageVersion=${{ env.APP_BUILD_VERSION }} test/TestLogger.UnitTests/TestLogger.UnitTests.csproj -p:CollectCoverage=true -p:CoverletOutputFormat=opencover | |
dotnet test -p:PackageVersion=${{ env.APP_BUILD_VERSION }} test/NUnit.Xml.TestLogger.UnitTests/NUnit.Xml.TestLogger.UnitTests.csproj -p:CollectCoverage=true -p:CoverletOutputFormat=opencover | |
dotnet test -p:PackageVersion=${{ env.APP_BUILD_VERSION }} test/JUnit.Xml.TestLogger.UnitTests/JUnit.Xml.TestLogger.UnitTests.csproj -p:CollectCoverage=true -p:CoverletOutputFormat=opencover | |
- name: Acceptance test | |
run: | | |
dotnet test -p:PackageVersion=${{ env.APP_BUILD_VERSION }} test/TestLogger.AcceptanceTests/TestLogger.AcceptanceTests.csproj | |
dotnet test -p:PackageVersion=${{ env.APP_BUILD_VERSION }} test/Xunit.Xml.TestLogger.AcceptanceTests/Xunit.Xml.TestLogger.AcceptanceTests.csproj | |
dotnet test -p:PackageVersion=${{ env.APP_BUILD_VERSION }} test/NUnit.Xml.TestLogger.AcceptanceTests/NUnit.Xml.TestLogger.AcceptanceTests.csproj | |
dotnet test -p:PackageVersion=${{ env.APP_BUILD_VERSION }} test/JUnit.Xml.TestLogger.AcceptanceTests/JUnit.Xml.TestLogger.AcceptanceTests.csproj | |
- name: Upload Verification Files on Fail | |
if: ${{ failure() }} | |
uses: actions/upload-artifact@v2 | |
with: | |
name: Acceptance Test Failure | |
retention-days: 5 | |
path: | | |
**/*.verified.txt | |
**/*.received.txt | |
- name: Codecov | |
uses: codecov/[email protected] | |
with: | |
files: test/TestLogger.UnitTests/coverage.opencover.xml | |
- name: Publish packages | |
if: ${{ github.event_name == 'push' && matrix.os == 'ubuntu-latest' }} | |
run: | | |
dotnet nuget push 'src/TestLogger/bin/Release/*.nupkg' --api-key ${{ secrets.SPEKT_MYGET_KEY }} --source https://www.myget.org/F/spekt/api/v3/index.json | |
dotnet nuget push 'src/Xunit.Xml.Package/bin/Release/*.nupkg' --api-key ${{ secrets.SPEKT_MYGET_KEY }} --source https://www.myget.org/F/spekt/api/v3/index.json | |
dotnet nuget push 'src/NUnit.Xml.Package/bin/Release/*.nupkg' --api-key ${{ secrets.SPEKT_MYGET_KEY }} --source https://www.myget.org/F/spekt/api/v3/index.json | |
dotnet nuget push 'src/JUnit.Xml.Package/bin/Release/*.nupkg' --api-key ${{ secrets.SPEKT_MYGET_KEY }} --source https://www.myget.org/F/spekt/api/v3/index.json |