-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add in github action to upload code coverage results (#245)
- Loading branch information
Showing
3 changed files
with
27 additions
and
4 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
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
27 changes: 27 additions & 0 deletions
27
.github/workflows/run_all_tests_and_upload_code_coverage.yml
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: "run_all_tests_and_upload_code_coverage" | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
|
||
jobs: | ||
run_all_tests_and_upload_code_coverage: | ||
runs-on: windows-latest | ||
timeout-minutes: 20 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: 8.x | ||
- name: Add zip files required for running tests | ||
run: | | ||
Compress-Archive -Path "resources\geocoding\*" -DestinationPath "resources\geocoding.zip" | ||
Compress-Archive -Path "resources\test\geocoding\*" -DestinationPath "resources\test\testgeocoding.zip" | ||
- name: Run tests | ||
run: dotnet test csharp/PhoneNumbers.sln --configuration Release --verbosity normal --collect:"XPlat Code Coverage" --results-directory ./coverage | ||
- name: Upload coverage reports to Codecov | ||
uses: codecov/codecov-action@v4.3.0 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
slug: twcclegg/libphonenumber-csharp |