Try copy files
This commit is contained in:
parent
bc470cfd07
commit
e9aee85861
7 changed files with 12 additions and 7 deletions
8
.github/workflows/build-and-test.yml
vendored
8
.github/workflows/build-and-test.yml
vendored
|
@ -17,14 +17,18 @@ jobs:
|
||||||
- name: Build
|
- name: Build
|
||||||
run: dotnet build
|
run: dotnet build
|
||||||
- name: Run Unit Tests
|
- name: Run Unit Tests
|
||||||
run: dotnet test --filter Unit --no-restore --verbosity normal
|
run: dotnet test --filter Category=Unit --no-restore --verbosity normal
|
||||||
|
- uses: canastro/copy-file-action@master
|
||||||
|
with:
|
||||||
|
source: "test/**/TestResults/*UnitTests.trx"
|
||||||
|
target: "TestResults"
|
||||||
- name: Start containers
|
- name: Start containers
|
||||||
run: docker-compose -f "docker-compose.yml" up -d --build
|
run: docker-compose -f "docker-compose.yml" up -d --build
|
||||||
- name: Wait for docker containers to setup
|
- name: Wait for docker containers to setup
|
||||||
run: sleep 30s
|
run: sleep 30s
|
||||||
shell: bash
|
shell: bash
|
||||||
- name: Run Integration Tests
|
- name: Run Integration Tests
|
||||||
run: dotnet test --filter Integration --no-restore --verbosity normal
|
run: dotnet test --filter Category=Integration --no-restore --verbosity normal
|
||||||
- name: Test Report
|
- name: Test Report
|
||||||
uses: dorny/test-reporter@v1
|
uses: dorny/test-reporter@v1
|
||||||
if: success() || failure()
|
if: success() || failure()
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<VSTestLogger>trx%3bLogFileName=$(MSBuildProjectName).trx</VSTestLogger>
|
<VSTestLogger>trx%3bLogFileName=$(MSBuildProjectName).trx</VSTestLogger>
|
||||||
<VSTestResultsDirectory>$(SolutionDir)/TestResults</VSTestResultsDirectory>
|
<VSTestResultsDirectory>$(MSBuildThisFileDirectory)/TestResults</VSTestResultsDirectory>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
using GitHubActionsDemo.Api.Sdk.Authors;
|
using GitHubActionsDemo.Api.Sdk.Authors;
|
||||||
using GitHubActionsDemo.Api.Sdk.Books;
|
using GitHubActionsDemo.Api.Sdk.Books;
|
||||||
using Refit;
|
using Refit;
|
||||||
|
@ -6,6 +5,7 @@ using Shouldly;
|
||||||
|
|
||||||
namespace GitHubActionsDemo.Api.Integration.Tests;
|
namespace GitHubActionsDemo.Api.Integration.Tests;
|
||||||
|
|
||||||
|
[Trait("Category", "Integration")]
|
||||||
public class IntegrationTests
|
public class IntegrationTests
|
||||||
{
|
{
|
||||||
private const string BaseUri = "http://localhost:5275";
|
private const string BaseUri = "http://localhost:5275";
|
||||||
|
|
|
@ -10,6 +10,7 @@ using GitHubActionsDemo.Api.Sdk.Shared;
|
||||||
|
|
||||||
namespace GitHubActionsDemo.Api.Unit.Tests;
|
namespace GitHubActionsDemo.Api.Unit.Tests;
|
||||||
|
|
||||||
|
[Trait("Category", "Unit")]
|
||||||
public class AuthorsControllerTests
|
public class AuthorsControllerTests
|
||||||
{
|
{
|
||||||
private readonly Mock<ILibraryService> _libraryService;
|
private readonly Mock<ILibraryService> _libraryService;
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<VSTestLogger>trx%3bLogFileName=$(MSBuildProjectName).trx</VSTestLogger>
|
<VSTestLogger>trx%3bLogFileName=$(MSBuildProjectName).trx</VSTestLogger>
|
||||||
<VSTestResultsDirectory>$(SolutionDir)/TestResults</VSTestResultsDirectory>
|
<VSTestResultsDirectory>$(MSBuildThisFileDirectory)/TestResults</VSTestResultsDirectory>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -30,6 +30,6 @@
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<VSTestLogger>trx%3bLogFileName=$(MSBuildProjectName).trx</VSTestLogger>
|
<VSTestLogger>trx%3bLogFileName=$(MSBuildProjectName).trx</VSTestLogger>
|
||||||
<VSTestResultsDirectory>$(SolutionDir)/TestResults</VSTestResultsDirectory>
|
<VSTestResultsDirectory>$(MSBuildThisFileDirectory)/TestResults</VSTestResultsDirectory>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
using System;
|
|
||||||
using GitHubActionsDemo.Persistance;
|
using GitHubActionsDemo.Persistance;
|
||||||
using GitHubActionsDemo.Persistance.Models;
|
using GitHubActionsDemo.Persistance.Models;
|
||||||
using GitHubActionsDemo.Service.Models;
|
using GitHubActionsDemo.Service.Models;
|
||||||
|
@ -6,6 +5,7 @@ using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
namespace GitHubActionsDemo.Service.Unit.Tests;
|
namespace GitHubActionsDemo.Service.Unit.Tests;
|
||||||
|
|
||||||
|
[Trait("Category", "Unit")]
|
||||||
public class LibraryServiceTests
|
public class LibraryServiceTests
|
||||||
{
|
{
|
||||||
private readonly Mock<ILibraryRespository> _libraryRespository;
|
private readonly Mock<ILibraryRespository> _libraryRespository;
|
||||||
|
|
Loading…
Reference in a new issue