diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 9941171..007e63a 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -57,14 +57,15 @@ jobs: run: dotnet build --no-restore --configuration Release - name: Test with coverage - run: | - cd AutoTestId.UnitTests - dotnet run --configuration Release -- --coverage --coverage-output-format cobertura --coverage-output coverage.cobertura.xml - + run: > + dotnet test --no-build --configuration Release + --collect:"XPlat Code Coverage" + --results-directory ./coverage + - name: Upload coverage to Codecov uses: codecov/codecov-action@v5 with: - file: ./AutoTestId.UnitTests/coverage.cobertura.xml + directory: ./coverage fail_ci_if_error: false verbose: true diff --git a/AutoTestId.UnitTests/AutoTestId.UnitTests.csproj b/AutoTestId.UnitTests/AutoTestId.UnitTests.csproj index 2fda140..97f609b 100644 --- a/AutoTestId.UnitTests/AutoTestId.UnitTests.csproj +++ b/AutoTestId.UnitTests/AutoTestId.UnitTests.csproj @@ -23,6 +23,7 @@ + diff --git a/AutoTestId/Commands/FileCommand.cs b/AutoTestId/Commands/FileCommand.cs index 38ba3ab..5f324fb 100644 --- a/AutoTestId/Commands/FileCommand.cs +++ b/AutoTestId/Commands/FileCommand.cs @@ -20,7 +20,7 @@ public class FileCommand : Command /// The command context /// The command settings /// Exit code (0 for success, non-zero for failure) - public override int Execute([NotNull] CommandContext context, [NotNull] FileCommandSettings settings) + public override int Execute([NotNull] CommandContext context, [NotNull] FileCommandSettings settings, CancellationToken cancellationToken) { try { diff --git a/AutoTestId/Commands/FolderCommand.cs b/AutoTestId/Commands/FolderCommand.cs index 4219846..a53be4e 100644 --- a/AutoTestId/Commands/FolderCommand.cs +++ b/AutoTestId/Commands/FolderCommand.cs @@ -20,7 +20,7 @@ public class FolderCommand : Command /// The command context /// The command settings /// Exit code (0 for success, non-zero for failure) - public override int Execute([NotNull] CommandContext context, [NotNull] FolderCommandSettings settings) + public override int Execute([NotNull] CommandContext context, [NotNull] FolderCommandSettings settings, CancellationToken cancellationToken) { try { diff --git a/AutoTestId/Commands/ProjectCommand.cs b/AutoTestId/Commands/ProjectCommand.cs index aa0a859..598416c 100644 --- a/AutoTestId/Commands/ProjectCommand.cs +++ b/AutoTestId/Commands/ProjectCommand.cs @@ -21,7 +21,7 @@ public class ProjectCommand : Command /// The command context /// The command settings /// Exit code (0 for success, non-zero for failure) - public override int Execute([NotNull] CommandContext context, [NotNull] ProjectCommandSettings settings) + public override int Execute([NotNull] CommandContext context, [NotNull] ProjectCommandSettings settings, CancellationToken cancellationToken) { try { diff --git a/AutoTestId/Commands/SolutionCommand.cs b/AutoTestId/Commands/SolutionCommand.cs index 98767c8..1d0e851 100644 --- a/AutoTestId/Commands/SolutionCommand.cs +++ b/AutoTestId/Commands/SolutionCommand.cs @@ -21,7 +21,7 @@ public class SolutionCommand : Command /// The command context /// The command settings /// Exit code (0 for success, non-zero for failure) - public override int Execute([NotNull] CommandContext context, [NotNull] SolutionCommandSettings settings) + public override int Execute([NotNull] CommandContext context, [NotNull] SolutionCommandSettings settings, CancellationToken cancellationToken) { try {