-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added test coverage to action * Adjusted report generation * Added some basic logic to dummy test * removed unnecessary ()
- Loading branch information
Showing
4 changed files
with
35 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,4 +25,13 @@ jobs: | |
- name: Build | ||
run: dotnet build --no-restore | ||
- name: Test | ||
run: dotnet test --no-build --verbosity normal | ||
run: dotnet test --no-build --verbosity normal --collect:"XPlat Code Coverage" | ||
- name: Find coverage reports | ||
id: find-reports | ||
run: | | ||
echo "::set-output name=paths::$(find ${{ github.workspace }} -name "coverage.cobertura.xml")" | ||
- name: Send coverage-reports to Codacy | ||
uses: codacy/[email protected] | ||
with: | ||
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} | ||
coverage-reports: ${{ steps.find-reports.outputs.paths }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
using Domain; | ||
|
||
namespace Test; | ||
|
||
public class UnitTest1 | ||
|
@@ -9,6 +11,13 @@ public void Test1() | |
// What did you expect, im lazy! | ||
// Ok, jokes aside. There will be unit tests which will be (hopefully) better than this. | ||
// But currently there are none. | ||
Assert.True(true); | ||
|
||
var user = new User | ||
{ | ||
Email = "[email protected]", | ||
Username = "test", | ||
}; | ||
|
||
Assert.Equal("[email protected]", user.Email); | ||
} | ||
} | ||
} |
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