Skip to content

chore: deploying just api to Az #27

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .azure/bicep/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ param location string = resourceGroup().location
@description('Select the type of environment you want to provision. Allowed values are Production and Test.')
@allowed([
'Production'
'Development'
])
param environmentName string

Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,6 @@ jobs:
restore-keys: |
${{ runner.os }}-nuget-

- name: Install Node & cache npm packages
uses: actions/setup-node@v3
with:
node-version: '18.x'
cache: 'npm'
cache-dependency-path: src/Web/ClientApp/package-lock.json

- name: Install .NET
uses: actions/setup-dotnet@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
tenant-id: ${{ vars.AZURE_TENANT_ID }}
subscription-id: ${{ vars.AZURE_SUBSCRIPTION_ID }}

- if: inputs.environmentName == 'Production'
- if: inputs.environmentName == 'Development'
uses: azure/arm-deploy@v1
name: Run preflight validation
with:
Expand All @@ -43,7 +43,7 @@ jobs:
projectName=${{ vars.PROJECT_NAME }}
deploymentMode: Validate

- if: inputs.environmentName == 'Production'
- if: inputs.environmentName != 'Development'
uses: azure/arm-deploy@v1
name: Run what-if
with:
Expand Down
1 change: 0 additions & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.0" />
<PackageVersion Include="Microsoft.AspNetCore.OpenApi" Version="8.0.0" />
<PackageVersion Include="Microsoft.AspNetCore.Identity.UI" Version="8.0.0" />
<PackageVersion Include="Microsoft.AspNetCore.SpaProxy" Version="8.0.0" />
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="8.0.0" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.0" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.0" />
Expand Down
7 changes: 0 additions & 7 deletions skillSphere.sln
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Web", "src\Web\Web.csproj", "{4E4EE20C-F06A-4A1B-851F-C5577796941C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Web.AcceptanceTests", "tests\Web.AcceptanceTests\Web.AcceptanceTests.csproj", "{21334974-6B07-47BB-B664-AC62FE58C12B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Application.FunctionalTests", "tests\Application.FunctionalTests\Application.FunctionalTests.csproj", "{EA6127A5-94C9-4C31-AD11-E6811B92B520}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Infrastructure.IntegrationTests", "tests\Infrastructure.IntegrationTests\Infrastructure.IntegrationTests.csproj", "{01FA6786-921D-4CE8-8C50-4FDA66C9477D}"
Expand Down Expand Up @@ -65,10 +63,6 @@ Global
{4E4EE20C-F06A-4A1B-851F-C5577796941C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4E4EE20C-F06A-4A1B-851F-C5577796941C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4E4EE20C-F06A-4A1B-851F-C5577796941C}.Release|Any CPU.Build.0 = Release|Any CPU
{21334974-6B07-47BB-B664-AC62FE58C12B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{21334974-6B07-47BB-B664-AC62FE58C12B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{21334974-6B07-47BB-B664-AC62FE58C12B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{21334974-6B07-47BB-B664-AC62FE58C12B}.Release|Any CPU.Build.0 = Release|Any CPU
{EA6127A5-94C9-4C31-AD11-E6811B92B520}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EA6127A5-94C9-4C31-AD11-E6811B92B520}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EA6127A5-94C9-4C31-AD11-E6811B92B520}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand All @@ -88,7 +82,6 @@ Global
{DEFF4009-1FAB-4392-80B6-707E2DC5C00B} = {664D406C-2F83-48F0-BFC3-408D5CB53C65}
{DC37FD87-552C-4613-9F16-1537CA522898} = {664D406C-2F83-48F0-BFC3-408D5CB53C65}
{4E4EE20C-F06A-4A1B-851F-C5577796941C} = {6ED356A7-8B47-4613-AD01-C85CF28491BD}
{21334974-6B07-47BB-B664-AC62FE58C12B} = {664D406C-2F83-48F0-BFC3-408D5CB53C65}
{EA6127A5-94C9-4C31-AD11-E6811B92B520} = {664D406C-2F83-48F0-BFC3-408D5CB53C65}
{01FA6786-921D-4CE8-8C50-4FDA66C9477D} = {664D406C-2F83-48F0-BFC3-408D5CB53C65}
EndGlobalSection
Expand Down
4 changes: 2 additions & 2 deletions src/Application/Application.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<RootNamespace>testSphere.Application</RootNamespace>
<AssemblyName>testSphere.Application</AssemblyName>
<RootNamespace>SkillSphere.Application</RootNamespace>
<AssemblyName>SkillSphere.Application</AssemblyName>
</PropertyGroup>

<ItemGroup>
Expand Down
8 changes: 4 additions & 4 deletions src/Application/Common/Behaviours/AuthorizationBehaviour.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using System.Reflection;
using testSphere.Application.Common.Exceptions;
using testSphere.Application.Common.Interfaces;
using testSphere.Application.Common.Security;
using SkillSphere.Application.Common.Exceptions;
using SkillSphere.Application.Common.Interfaces;
using SkillSphere.Application.Common.Security;

namespace testSphere.Application.Common.Behaviours;
namespace SkillSphere.Application.Common.Behaviours;

public class AuthorizationBehaviour<TRequest, TResponse> : IPipelineBehavior<TRequest, TResponse> where TRequest : notnull
{
Expand Down
4 changes: 2 additions & 2 deletions src/Application/Common/Behaviours/LoggingBehaviour.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using testSphere.Application.Common.Interfaces;
using SkillSphere.Application.Common.Interfaces;
using MediatR.Pipeline;
using Microsoft.Extensions.Logging;

namespace testSphere.Application.Common.Behaviours;
namespace SkillSphere.Application.Common.Behaviours;

public class LoggingBehaviour<TRequest> : IRequestPreProcessor<TRequest> where TRequest : notnull
{
Expand Down
4 changes: 2 additions & 2 deletions src/Application/Common/Behaviours/PerformanceBehaviour.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using System.Diagnostics;
using testSphere.Application.Common.Interfaces;
using SkillSphere.Application.Common.Interfaces;
using Microsoft.Extensions.Logging;

namespace testSphere.Application.Common.Behaviours;
namespace SkillSphere.Application.Common.Behaviours;

public class PerformanceBehaviour<TRequest, TResponse> : IPipelineBehavior<TRequest, TResponse> where TRequest : notnull
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Microsoft.Extensions.Logging;

namespace testSphere.Application.Common.Behaviours;
namespace SkillSphere.Application.Common.Behaviours;

public class UnhandledExceptionBehaviour<TRequest, TResponse> : IPipelineBehavior<TRequest, TResponse> where TRequest : notnull
{
Expand Down
4 changes: 2 additions & 2 deletions src/Application/Common/Behaviours/ValidationBehaviour.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using ValidationException = testSphere.Application.Common.Exceptions.ValidationException;
using ValidationException = SkillSphere.Application.Common.Exceptions.ValidationException;

namespace testSphere.Application.Common.Behaviours;
namespace SkillSphere.Application.Common.Behaviours;

public class ValidationBehaviour<TRequest, TResponse> : IPipelineBehavior<TRequest, TResponse>
where TRequest : notnull
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace testSphere.Application.Common.Exceptions;
namespace SkillSphere.Application.Common.Exceptions;

public class ForbiddenAccessException : Exception
{
Expand Down
2 changes: 1 addition & 1 deletion src/Application/Common/Exceptions/ValidationException.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using FluentValidation.Results;

namespace testSphere.Application.Common.Exceptions;
namespace SkillSphere.Application.Common.Exceptions;

public class ValidationException : Exception
{
Expand Down
4 changes: 2 additions & 2 deletions src/Application/Common/Interfaces/IApplicationDbContext.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using testSphere.Domain.Entities;
using SkillSphere.Domain.Entities;

namespace testSphere.Application.Common.Interfaces;
namespace SkillSphere.Application.Common.Interfaces;

public interface IApplicationDbContext
{
Expand Down
4 changes: 2 additions & 2 deletions src/Application/Common/Interfaces/IIdentityService.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using testSphere.Application.Common.Models;
using SkillSphere.Application.Common.Models;

namespace testSphere.Application.Common.Interfaces;
namespace SkillSphere.Application.Common.Interfaces;

public interface IIdentityService
{
Expand Down
2 changes: 1 addition & 1 deletion src/Application/Common/Interfaces/IUser.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace testSphere.Application.Common.Interfaces;
namespace SkillSphere.Application.Common.Interfaces;

public interface IUser
{
Expand Down
4 changes: 2 additions & 2 deletions src/Application/Common/Mappings/MappingExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using testSphere.Application.Common.Models;
using SkillSphere.Application.Common.Models;

namespace testSphere.Application.Common.Mappings;
namespace SkillSphere.Application.Common.Mappings;

public static class MappingExtensions
{
Expand Down
4 changes: 2 additions & 2 deletions src/Application/Common/Models/LookupDto.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using testSphere.Domain.Entities;
using SkillSphere.Domain.Entities;

namespace testSphere.Application.Common.Models;
namespace SkillSphere.Application.Common.Models;

public class LookupDto
{
Expand Down
2 changes: 1 addition & 1 deletion src/Application/Common/Models/PaginatedList.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace testSphere.Application.Common.Models;
namespace SkillSphere.Application.Common.Models;

public class PaginatedList<T>
{
Expand Down
2 changes: 1 addition & 1 deletion src/Application/Common/Models/Result.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace testSphere.Application.Common.Models;
namespace SkillSphere.Application.Common.Models;

public class Result
{
Expand Down
2 changes: 1 addition & 1 deletion src/Application/Common/Security/AuthorizeAttribute.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace testSphere.Application.Common.Security;
namespace SkillSphere.Application.Common.Security;

/// <summary>
/// Specifies the class this attribute is applied to requires authorization.
Expand Down
5 changes: 3 additions & 2 deletions src/Application/DependencyInjection.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
using System.Reflection;
using testSphere.Application.Common.Behaviours;
using Microsoft.Extensions.DependencyInjection;
using SkillSphere.Application.Common.Behaviours;

namespace Microsoft.Extensions.DependencyInjection;
namespace SkillSphere.Application;

public static class DependencyInjection
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using testSphere.Application.Common.Interfaces;
using testSphere.Domain.Entities;
using testSphere.Domain.Events;
using SkillSphere.Domain.Entities;
using SkillSphere.Domain.Events;
using SkillSphere.Application.Common.Interfaces;

namespace testSphere.Application.TodoItems.Commands.CreateTodoItem;
namespace SkillSphere.Application.TodoItems.Commands.CreateTodoItem;

public record CreateTodoItemCommand : IRequest<int>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace testSphere.Application.TodoItems.Commands.CreateTodoItem;
namespace SkillSphere.Application.TodoItems.Commands.CreateTodoItem;

public class CreateTodoItemCommandValidator : AbstractValidator<CreateTodoItemCommand>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using testSphere.Application.Common.Interfaces;
using testSphere.Domain.Events;
using SkillSphere.Domain.Events;
using SkillSphere.Application.Common.Interfaces;

namespace testSphere.Application.TodoItems.Commands.DeleteTodoItem;
namespace SkillSphere.Application.TodoItems.Commands.DeleteTodoItem;

public record DeleteTodoItemCommand(int Id) : IRequest;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using testSphere.Application.Common.Interfaces;
using SkillSphere.Application.Common.Interfaces;

namespace testSphere.Application.TodoItems.Commands.UpdateTodoItem;
namespace SkillSphere.Application.TodoItems.Commands.UpdateTodoItem;

public record UpdateTodoItemCommand : IRequest
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace testSphere.Application.TodoItems.Commands.UpdateTodoItem;
namespace SkillSphere.Application.TodoItems.Commands.UpdateTodoItem;

public class UpdateTodoItemCommandValidator : AbstractValidator<UpdateTodoItemCommand>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using testSphere.Application.Common.Interfaces;
using testSphere.Domain.Enums;
using SkillSphere.Domain.Enums;
using SkillSphere.Application.Common.Interfaces;

namespace testSphere.Application.TodoItems.Commands.UpdateTodoItemDetail;
namespace SkillSphere.Application.TodoItems.Commands.UpdateTodoItemDetail;

public record UpdateTodoItemDetailCommand : IRequest
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using testSphere.Domain.Events;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging;
using SkillSphere.Domain.Events;

namespace testSphere.Application.TodoItems.EventHandlers;
namespace SkillSphere.Application.TodoItems.EventHandlers;

public class TodoItemCompletedEventHandler : INotificationHandler<TodoItemCompletedEvent>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using testSphere.Domain.Events;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging;
using SkillSphere.Domain.Events;

namespace testSphere.Application.TodoItems.EventHandlers;
namespace SkillSphere.Application.TodoItems.EventHandlers;

public class TodoItemCreatedEventHandler : INotificationHandler<TodoItemCreatedEvent>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using testSphere.Application.Common.Interfaces;
using testSphere.Application.Common.Mappings;
using testSphere.Application.Common.Models;
using SkillSphere.Application.Common.Interfaces;
using SkillSphere.Application.Common.Mappings;
using SkillSphere.Application.Common.Models;

namespace testSphere.Application.TodoItems.Queries.GetTodoItemsWithPagination;
namespace SkillSphere.Application.TodoItems.Queries.GetTodoItemsWithPagination;

public record GetTodoItemsWithPaginationQuery : IRequest<PaginatedList<TodoItemBriefDto>>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace testSphere.Application.TodoItems.Queries.GetTodoItemsWithPagination;
namespace SkillSphere.Application.TodoItems.Queries.GetTodoItemsWithPagination;

public class GetTodoItemsWithPaginationQueryValidator : AbstractValidator<GetTodoItemsWithPaginationQuery>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using testSphere.Domain.Entities;
using SkillSphere.Domain.Entities;

namespace testSphere.Application.TodoItems.Queries.GetTodoItemsWithPagination;
namespace SkillSphere.Application.TodoItems.Queries.GetTodoItemsWithPagination;

public class TodoItemBriefDto
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using testSphere.Application.Common.Interfaces;
using testSphere.Domain.Entities;
using SkillSphere.Domain.Entities;
using SkillSphere.Application.Common.Interfaces;

namespace testSphere.Application.TodoLists.Commands.CreateTodoList;
namespace SkillSphere.Application.TodoLists.Commands.CreateTodoList;

public record CreateTodoListCommand : IRequest<int>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using testSphere.Application.Common.Interfaces;
using SkillSphere.Application.Common.Interfaces;

namespace testSphere.Application.TodoLists.Commands.CreateTodoList;
namespace SkillSphere.Application.TodoLists.Commands.CreateTodoList;

public class CreateTodoListCommandValidator : AbstractValidator<CreateTodoListCommand>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using testSphere.Application.Common.Interfaces;
using SkillSphere.Application.Common.Interfaces;

namespace testSphere.Application.TodoLists.Commands.DeleteTodoList;
namespace SkillSphere.Application.TodoLists.Commands.DeleteTodoList;

public record DeleteTodoListCommand(int Id) : IRequest;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using testSphere.Application.Common.Interfaces;
using testSphere.Application.Common.Security;
using testSphere.Domain.Constants;
using SkillSphere.Domain.Constants;
using SkillSphere.Application.Common.Interfaces;
using SkillSphere.Application.Common.Security;

namespace testSphere.Application.TodoLists.Commands.PurgeTodoLists;
namespace SkillSphere.Application.TodoLists.Commands.PurgeTodoLists;

[Authorize(Roles = Roles.Administrator)]
[Authorize(Policy = Policies.CanPurge)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using testSphere.Application.Common.Interfaces;
using SkillSphere.Application.Common.Interfaces;

namespace testSphere.Application.TodoLists.Commands.UpdateTodoList;
namespace SkillSphere.Application.TodoLists.Commands.UpdateTodoList;

public record UpdateTodoListCommand : IRequest
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using testSphere.Application.Common.Interfaces;
using SkillSphere.Application.Common.Interfaces;

namespace testSphere.Application.TodoLists.Commands.UpdateTodoList;
namespace SkillSphere.Application.TodoLists.Commands.UpdateTodoList;

public class UpdateTodoListCommandValidator : AbstractValidator<UpdateTodoListCommand>
{
Expand Down
Loading