Skip to content

Commit

Permalink
added test project build step
Browse files Browse the repository at this point in the history
  • Loading branch information
Radoslav Radev committed Mar 9, 2024
1 parent 0aae450 commit 0bcd67f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/AccountPipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@ jobs:
run: dotnet restore Backend/Tests/Account.Test/Account.Test.csproj
- name: Build Account project
run: dotnet build Backend/Account/Account.csproj --no-restore
- name: Build Account Test project
run: dotnet build Backend/Tests/Account.Test/Account.Test.csproj --no-restore
- name: List test assembly path
run: ls -la Backend/Tests/Account.Test/bin/Debug/net8.0/
- name: Run tests
run: dotnet test Backend/Tests/Account.Test/Account.Test.csproj --no-build --verbosity normal
run: dotnet test Backend/Tests/Account.Test/Account.Test.csproj --verbosity normal

- name: Log in to DockerHub
uses: docker/login-action@v1
Expand Down
2 changes: 1 addition & 1 deletion Backend/Account/Services/AccountService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class AccountService(DatabaseContext _accountDbContext, IConfiguration co
private readonly AsyncRetryPolicy _dbRetryPolicy = Policy.Handle<Exception>().WaitAndRetryAsync(3, i => TimeSpan.FromSeconds(10));

public async Task<Tuple<AccountDTO,string>?> Login(LoginRequestDTO request)
{
{
var account = await _accountDbContext.Accounts.FirstOrDefaultAsync(x => x.Email == request.email);
if (account is null) return null;
var authToken = AuthTokenGenerator.GenerateOwnAuthToken(account.AccId.ToString(),configuration);
Expand Down

0 comments on commit 0bcd67f

Please sign in to comment.