Skip to content

Commit

Permalink
Change the way to upload coverage reports
Browse files Browse the repository at this point in the history
  • Loading branch information
Putta Khunchalee committed Dec 16, 2019
1 parent 80a116d commit 77b5d30
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ jobs:
- name: Install EF CLI
shell: cmd
run: dotnet.exe tool install --global dotnet-ef --version 3.0.0
- name: Install Coverage Uploader
shell: cmd
run: choco install codecov --no-progress
- name: Build
shell: cmd
run: dotnet.exe build src\Ztm.sln
Expand All @@ -38,18 +41,24 @@ jobs:
$input
)
Write-Host -Object "Processing $input"
$transform = Start-Process -FilePath $tool -ArgumentList $args -NoNewWindow -PassThru -Wait
if ($transform.ExitCode -ne 0) {
exit $transform.ExitCode
}
}
- name: Upload Coverage Reports
uses: codecov/codecov-action@v1.0.5
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: coverage-reports\*.coveragexml
fail_ci_if_error: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: |
$files = Get-ChildItem -Path coverage-reports -Filter *.coveragexml -File | Join-String -Property Name -Separator " " -OutputPrefix coverage-reports\
$uploader = Start-Process -FilePath codecov.exe -ArgumentList -f, $files, --required -NoNewWindow -PassThru -Wait
if ($uploader.ExitCode -ne 0) {
exit $uploader.ExitCode
}
- name: Create Release
shell: cmd
run: dotnet.exe publish -o "%GITHUB_WORKSPACE%\release" -r linux-musl-x64 -c Release src\Ztm.WebApi
Expand Down

0 comments on commit 77b5d30

Please sign in to comment.