Skip to content

Commit

Permalink
update github action workflows to upload test results to Codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
litenova committed Nov 26, 2023
1 parent 3e22b19 commit d32a9e4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Setup .NET 7
- name: Setup .NET 8
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
global-json-file: global.json

- name: Restore
run: dotnet restore
Expand Down
18 changes: 10 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,27 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Setup .NET 7
- name: Setup .NET 8
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
global-json-file: global.json

- name: Restore
run: dotnet restore

- name: Build
run: dotnet build --configuration Release --no-restore
run: dotnet build --configuration Release --no-restore /p:ContinuousIntegrationBuild=true

- name: Test
run: dotnet test --no-restore --results-directory ../../TestResults /p:CollectCoverage=true /p:CoverletOutput=../../TestResults/ /p:CoverletOutputFormat=lcov
run: dotnet test --no-restore --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=opencover

- name: Publish Test Coverage Report to Coveralls.io
uses: coverallsapp/github-action@master
- name: Upload to Codecov
uses: codecov/codecov-action@v3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: TestResults/coverage.info
files: ./tests/LiteBus.Commands.UnitTests/coverage.cobertura.xml, ./tests/LiteBus.Events.UnitTests/coverage.cobertura.xml, ./tests/LiteBus.Queries.UnitTests/coverage.cobertura.xml, ./tests/LiteBus.UnitTests/coverage.cobertura.xml
flags: unittests
fail_ci_if_error: true
verbose: true

- name: Generate Nuget Packages
run: dotnet pack --configuration Release
Expand Down

0 comments on commit d32a9e4

Please sign in to comment.