-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/development' into INFSCP01-39-fe…
…ature-update-transfer-with-put
- Loading branch information
Showing
10 changed files
with
147 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Issue | ||
_[...Jira link of the related issue]_ | ||
|
||
## Description | ||
A few sentences describing the overall goals of the pull request's commits. | ||
|
||
## Type of change | ||
|
||
- [ ] New feature (non-breaking change which adds functionality) | ||
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) | ||
- [ ] Bug fix (non-breaking change which fixes an issue) | ||
- [ ] This change requires a documentation update | ||
|
||
## Steps to _[...Test or Reproduce]_ | ||
Outline the steps to test or reproduce the PR here. | ||
|
||
1. _...[step 1]_ | ||
2. _...[step 2]_ | ||
|
||
## Related PRs | ||
List related PRs against other branches and projects: | ||
|
||
branch | PR | ||
------ | ------ | ||
othother_pr_production | [link]() | ||
other_pr_master | [link]() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,78 @@ | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net | ||
|
||
name: CargoHub API build | ||
name: CargoHub API CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- development | ||
- main | ||
- development | ||
pull_request: | ||
branches: | ||
- main | ||
- development | ||
- main | ||
- development | ||
|
||
jobs: | ||
build: | ||
lint: | ||
name: Lint Code | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: 8.0.x | ||
- name: Run Code Formatter Verify No Changes | ||
run: dotnet format --verify-no-changes > lint-results.txt 2>&1 --verbosity diagnostic | ||
- name: Upload lint results | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: Lint results | ||
path: lint-results.txt | ||
retention-days: 5 | ||
if: ${{ failure() }} | ||
|
||
build: | ||
name: Build Application | ||
runs-on: ubuntu-latest | ||
needs: lint | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: 8.0.x | ||
- name: Restore dependencies | ||
run: dotnet restore | ||
- name: Build Project | ||
run: dotnet build > build-results.txt 2>&1 --no-restore -nowarn:8602 | ||
- name: Upload build logs | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: Build results | ||
path: build-results.txt | ||
retention-days: 5 | ||
if: ${{ failure() }} | ||
|
||
test_and_code_coverage: | ||
name: Run Tests & Generate Code Coverage Report | ||
runs-on: ubuntu-latest | ||
needs: build | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: 8.0.x | ||
- name: Restore dependencies | ||
run: dotnet restore | ||
- name: Build | ||
run: dotnet build --no-restore | ||
- name: Test | ||
run: dotnet test --no-build --verbosity normal | ||
- uses: actions/checkout@v4 | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: 8.0.x | ||
- name: Run Tests & Generate Report | ||
run: dotnet test --collect:"XPlat Code Coverage" | ||
- name: ReportGenerator | ||
uses: danielpalme/[email protected] | ||
with: | ||
reports: 'api.Tests/TestResults/*/coverage.cobertura.xml' | ||
targetdir: 'api.Tests/Report' | ||
reporttypes: 'Html' | ||
classfilters: '+EnumUtil' # Temporarily | ||
- name: Upload coverage report artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: CoverageReport | ||
path: 'api.Tests/Report' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
.vs | ||
.idea | ||
.idea | ||
api.Tests/bin | ||
api.Tests/obj | ||
api.Tests/TestResults |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
namespace api.Tests; | ||
|
||
public class UnitTest1 | ||
{ | ||
[Fact] | ||
public void Test_EnumsToString_ReturnsCorrectString() | ||
{ | ||
// Arrange | ||
string expectedResult = "Pending, Processing, Cancelled, Completed"; | ||
|
||
// Act | ||
string result = EnumUtil.EnumsToString<TransferStatus>(); | ||
|
||
// Assert | ||
Assert.Equal(expectedResult, result); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
|
||
<IsPackable>false</IsPackable> | ||
<IsTestProject>true</IsTestProject> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="coverlet.collector" Version="6.0.0" /> | ||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" /> | ||
<PackageReference Include="xunit" Version="2.5.3" /> | ||
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<Using Include="Xunit" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\api\api.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
�� |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters