Skip to content

Commit cb3b745

Browse files
committed
Fix path in GitHub Actions workflow for dotnet publish command
1 parent 75129b5 commit cb3b745

File tree

11 files changed

+108
-115
lines changed

11 files changed

+108
-115
lines changed

.github/workflows/api.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- name: Test
2626
run: dotnet test --no-build --verbosity normal
2727
- name: dotnet publish
28-
run: dotnet publish UrlShortener.Api -c Release -o ${{env.DOTNET_ROOT}}/myapp
28+
run: dotnet publish Api\UrlShortener.Api -c Release -o ${{env.DOTNET_ROOT}}/myapp
2929
- name: Upload artifact for deployment job
3030
uses: actions/upload-artifact@v4
3131
with:

Api/UrlShortener.Api/Api.http

Lines changed: 0 additions & 6 deletions
This file was deleted.

Api/UrlShortener.Api/Program.cs

Lines changed: 0 additions & 48 deletions
This file was deleted.

Api/UrlShortener.Api/Properties/launchSettings.json

Lines changed: 0 additions & 23 deletions
This file was deleted.

Api/UrlShortener.Api/UrlShortener.Api.csproj

Lines changed: 0 additions & 15 deletions
This file was deleted.

Api/UrlShortener.Api/appsettings.Development.json

Lines changed: 0 additions & 8 deletions
This file was deleted.

Api/UrlShortener.Api/appsettings.json

Lines changed: 0 additions & 9 deletions
This file was deleted.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
namespace UrlShortener.Api.Core.Tests;
2+
3+
public static class Base62EncodingExtensions
4+
{
5+
private const string Alphanumeric = "0123456789" +
6+
"abcdefghijklmnopqrstuvwxyz" +
7+
"ABCDEFGHIJKLMNOPQRSTUVWXYZ";
8+
public static string EncodeToBase62(this int number)
9+
{
10+
if(number is 0) return Alphanumeric[0].ToString();
11+
12+
var result = new Stack<char>();
13+
14+
while (number > 0)
15+
{
16+
result.Push(Alphanumeric[number % 62]);
17+
number /= 62;
18+
}
19+
20+
return new string(result.ToArray());
21+
}
22+
23+
}

GenerateUrlShortener.sln

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,17 @@ Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio Version 17
44
VisualStudioVersion = 17.0.31903.59
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UrlShortener.Api", "UrlShortener.Api\UrlShortener.Api.csproj", "{C41A51F9-0688-4F6A-8BC8-82EBEE9A14D0}"
6+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Api", "Api", "{25BDC746-EDEE-4BF8-B0B1-C591F3675800}"
7+
EndProject
8+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UrlShortener.Api", "Api\src\UrlShortener.Api\UrlShortener.Api.csproj", "{9444E84C-C4B0-41C5-A453-47B1D20DDC81}"
9+
EndProject
10+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{E8A1DDA7-C059-4F2A-BD69-FB182403494E}"
11+
EndProject
12+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{22B1E0E4-6E75-4AEE-A9BC-60A443602471}"
13+
EndProject
14+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UrlShortener.Api.Core.Tests", "UrlShortener.Api.Core.Tests\UrlShortener.Api.Core.Tests.csproj", "{1CDF3857-E332-4E13-8CCB-FD03275AB935}"
15+
EndProject
16+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UrlShortener.Core", "Api\src\UrlShortener.Core\UrlShortener.Core.csproj", "{F9653843-B56F-4384-9A90-F65984099016}"
717
EndProject
818
Global
919
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -14,9 +24,24 @@ Global
1424
HideSolutionNode = FALSE
1525
EndGlobalSection
1626
GlobalSection(ProjectConfigurationPlatforms) = postSolution
17-
{C41A51F9-0688-4F6A-8BC8-82EBEE9A14D0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
18-
{C41A51F9-0688-4F6A-8BC8-82EBEE9A14D0}.Debug|Any CPU.Build.0 = Debug|Any CPU
19-
{C41A51F9-0688-4F6A-8BC8-82EBEE9A14D0}.Release|Any CPU.ActiveCfg = Release|Any CPU
20-
{C41A51F9-0688-4F6A-8BC8-82EBEE9A14D0}.Release|Any CPU.Build.0 = Release|Any CPU
27+
{9444E84C-C4B0-41C5-A453-47B1D20DDC81}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
28+
{9444E84C-C4B0-41C5-A453-47B1D20DDC81}.Debug|Any CPU.Build.0 = Debug|Any CPU
29+
{9444E84C-C4B0-41C5-A453-47B1D20DDC81}.Release|Any CPU.ActiveCfg = Release|Any CPU
30+
{9444E84C-C4B0-41C5-A453-47B1D20DDC81}.Release|Any CPU.Build.0 = Release|Any CPU
31+
{1CDF3857-E332-4E13-8CCB-FD03275AB935}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
32+
{1CDF3857-E332-4E13-8CCB-FD03275AB935}.Debug|Any CPU.Build.0 = Debug|Any CPU
33+
{1CDF3857-E332-4E13-8CCB-FD03275AB935}.Release|Any CPU.ActiveCfg = Release|Any CPU
34+
{1CDF3857-E332-4E13-8CCB-FD03275AB935}.Release|Any CPU.Build.0 = Release|Any CPU
35+
{F9653843-B56F-4384-9A90-F65984099016}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
36+
{F9653843-B56F-4384-9A90-F65984099016}.Debug|Any CPU.Build.0 = Debug|Any CPU
37+
{F9653843-B56F-4384-9A90-F65984099016}.Release|Any CPU.ActiveCfg = Release|Any CPU
38+
{F9653843-B56F-4384-9A90-F65984099016}.Release|Any CPU.Build.0 = Release|Any CPU
39+
EndGlobalSection
40+
GlobalSection(NestedProjects) = preSolution
41+
{E8A1DDA7-C059-4F2A-BD69-FB182403494E} = {25BDC746-EDEE-4BF8-B0B1-C591F3675800}
42+
{9444E84C-C4B0-41C5-A453-47B1D20DDC81} = {E8A1DDA7-C059-4F2A-BD69-FB182403494E}
43+
{22B1E0E4-6E75-4AEE-A9BC-60A443602471} = {25BDC746-EDEE-4BF8-B0B1-C591F3675800}
44+
{1CDF3857-E332-4E13-8CCB-FD03275AB935} = {22B1E0E4-6E75-4AEE-A9BC-60A443602471}
45+
{F9653843-B56F-4384-9A90-F65984099016} = {E8A1DDA7-C059-4F2A-BD69-FB182403494E}
2146
EndGlobalSection
2247
EndGlobal
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// Global using directives
2+
3+
global using FluentAssertions;

0 commit comments

Comments
 (0)