Skip to content

Commit 776a0e7

Browse files
authored
Merge pull request #8 from Mathavana/develop
Develop - circleci config added
2 parents 7a7e011 + 3fb93c1 commit 776a0e7

File tree

4 files changed

+46
-16
lines changed

4 files changed

+46
-16
lines changed

.circleci/config.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
workflows:
2+
version: 2.1
3+
main:
4+
jobs:
5+
- build:
6+
filters:
7+
branches:
8+
only:
9+
- develop
10+
- master
11+
version: 2.1
12+
jobs:
13+
build:
14+
docker:
15+
- image: mcr.microsoft.com/dotnet/core/sdk:2.2
16+
steps:
17+
- checkout
18+
- run:
19+
name: Find
20+
command: find .
21+
- run:
22+
name: Restore
23+
command: dotnet restore ./Supermarket.Core/Supermarket.Core.csproj
24+
- run:
25+
name: Build
26+
command: dotnet build ./Supermarket.Core/Supermarket.Core.csproj
27+
- run:
28+
name: Restore
29+
command: dotnet restore ./Supermarket/Supermarket.csproj
30+
- run:
31+
name: Build
32+
command: dotnet build ./Supermarket/Supermarket.csproj
33+
- run:
34+
name: Test
35+
command: dotnet test ./Supermarket.UnitTests/Supermarket.UnitTests.csproj

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# ASP.NET Core Web API development
22

3+
| Branch | CircleCi |
4+
| ------ | ------ |
5+
| master | ![CircleCI branch](https://img.shields.io/circleci/project/github/Mathavana/asp_net_core_api/master.svg?style=popout) |
6+
| develop | ![CircleCI branch](https://img.shields.io/circleci/project/github/Mathavana/asp_net_core_api/develop.svg?style=popout) |
7+
38
We will try to create an API application using asp.net core.
49
- Mainly using repository pattern, generics, LINQ, Entity framework core
510
- Main business logic implemented in InMemeory Database (plan to use MSSQL DB)
@@ -17,6 +22,7 @@ We will try to create an API application using asp.net core.
1722
- Standard response for both error/success results
1823
- Global Error Handling
1924
- Dockerization
25+
- CircleCi
2026

2127
### Note
2228
- Trying to understand best practices. May be frequently modified the project structure.

Supermarket.Core/Supermarket.Core.csproj

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,16 @@
44
<TargetFramework>netcoreapp2.2</TargetFramework>
55
</PropertyGroup>
66

7-
<ItemGroup>
8-
<Reference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore">
9-
<HintPath>C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.aspnetcore.identity.entityframeworkcore\2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Identity.EntityFrameworkCore.dll</HintPath>
10-
</Reference>
11-
<Reference Include="Microsoft.EntityFrameworkCore">
12-
<HintPath>C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.entityframeworkcore\2.2.0\lib\netstandard2.0\Microsoft.EntityFrameworkCore.dll</HintPath>
13-
</Reference>
14-
<Reference Include="Microsoft.EntityFrameworkCore.Relational">
15-
<HintPath>C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.entityframeworkcore.relational\2.2.0\lib\netstandard2.0\Microsoft.EntityFrameworkCore.Relational.dll</HintPath>
16-
</Reference>
17-
<Reference Include="Microsoft.Extensions.Identity.Stores">
18-
<HintPath>C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.extensions.identity.stores\2.2.0\lib\netstandard2.0\Microsoft.Extensions.Identity.Stores.dll</HintPath>
19-
</Reference>
20-
</ItemGroup>
21-
227
<ItemGroup>
238
<Folder Include="Services\Contracts\" />
249
</ItemGroup>
2510

2611
<ItemGroup>
12+
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="2.2.0" />
13+
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.2.3" />
14+
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="2.2.3" />
2715
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.2.3" />
16+
<PackageReference Include="Microsoft.Extensions.Identity.Stores" Version="2.2.0" />
2817
</ItemGroup>
2918

3019
</Project>

Supermarket/Extensions/ServiceExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public static void ConfigureSwagger(this IServiceCollection services, Type type)
7575
{
7676
services.AddSwaggerGen(options =>
7777
{
78-
// Resolve the temprary IApiVersionDescriptionProvider service
78+
// Resolve the temporary IApiVersionDescriptionProvider service
7979
var provider = services.BuildServiceProvider().GetRequiredService<IApiVersionDescriptionProvider>();
8080

8181
// Add a swagger document for each discovered API version

0 commit comments

Comments
 (0)