Skip to content
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
74 changes: 74 additions & 0 deletions .github/workflows/dotnet-8-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: .NET 8 CI

on:
push:
pull_request:

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- uses: bcgov/ag-devops/ci/dotnetcore/composite/dotnet-8-lint@v1.0.0

build:
name: Build
runs-on: ubuntu-latest
needs: lint
steps:
- uses: actions/checkout@v4
- uses: bcgov/ag-devops/ci/dotnetcore/composite/dotnet-8-dependencies@v1.0.0
with:
dotnet_build_path: "src/RfcBuddy.Web"
- uses: bcgov/ag-devops/ci/dotnetcore/composite/dotnet-8-build@v1.0.0
with:
dotnet_build_path: "src/RfcBuddy.Web"
warn_as_error: "true"

test:
name: Tests
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- uses: bcgov/ag-devops/ci/dotnetcore/composite/dotnet-8-tests-msbuild@v1.0.0
with:
unit_test_folder: "src/RfcBuddy.App.Tests"
coverage_threshold: "25"
coverage_threshold_type: "line,branch"

sast:
runs-on: ubuntu-latest
needs: [build, test]
steps:
- uses: actions/checkout@v4

- uses: bcgov/ag-devops/ci/security/sast@v1.0.0
with:
project-key: RfcBuddy
sonar-token: ${{ secrets.SONAR_TOKEN }}
sonar-host-url: ${{ vars.SONAR_HOST_URL }}
coverage-report: TestResults/coverage/coverage.cobertura.xml
gitleaks_license: ${{ secrets.GITLEAKS_LICENSE }}
github_token: ${{ secrets.GITHUB_TOKEN }}

package:
name: Package
runs-on: ubuntu-latest
needs: sast
steps:
- uses: actions/checkout@v4
- uses: bcgov/ag-devops/ci/.shared/docker-dind@v1.0.0



semantic_release:
runs-on: ubuntu-latest
needs: [package]
steps:
- uses: bcgov/ag-devops/ci/release/semantic-release@v1.0.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
31 changes: 31 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Changelog

## 1.0.0 (2025-08-16)


### Features

* added ci workflow ([1e9c395](https://github.com/sookeke/RfcBuddy/commit/1e9c39551c71bb3df5e2b281fda53594205662b2))
* added ci workflow ([fc9aabf](https://github.com/sookeke/RfcBuddy/commit/fc9aabfe0810390b83a91413e929dc208723b928))
* added ci workflow ([f3722e2](https://github.com/sookeke/RfcBuddy/commit/f3722e2cde04bfaf7f6bf51e8e9cd6c60ad8d7a9))
* added ci workflow ([7a38908](https://github.com/sookeke/RfcBuddy/commit/7a389080dd629c4adbd77c62abee10b1b1477d53))
* added ci workflow ([51b8e10](https://github.com/sookeke/RfcBuddy/commit/51b8e10f90dd18d925d5cc16dc8c2d908d1aa622))
* added ci workflow ([e1c0e20](https://github.com/sookeke/RfcBuddy/commit/e1c0e200ea9e594acc8d801824548155d0cd342a))
* added ci workflow ([9f6cb40](https://github.com/sookeke/RfcBuddy/commit/9f6cb4092431757007e237d6c187638efa29ce1c))
* added ci workflow ([c9e0ce1](https://github.com/sookeke/RfcBuddy/commit/c9e0ce1e05eff1fbba08173c6a3f850ac1a01aa6))
* added ci workflow ([e98067f](https://github.com/sookeke/RfcBuddy/commit/e98067ff645095b9685007dc33a39e8c56359f44))
* added ci workflow ([038fcdc](https://github.com/sookeke/RfcBuddy/commit/038fcdc41a031f184dba219eea57ca4840134d27))
* added ci workflow ([10b3a32](https://github.com/sookeke/RfcBuddy/commit/10b3a32702a1293943871976e10389460e404b2c))
* added ci workflow ([d372191](https://github.com/sookeke/RfcBuddy/commit/d37219103c7ec5fc736801043d6a7cd5052ff4f7))
* added ci workflow ([127b597](https://github.com/sookeke/RfcBuddy/commit/127b5970923683473602b1ae48d16a13f866665a))
* added ci workflow ([4bef666](https://github.com/sookeke/RfcBuddy/commit/4bef666a79a28ed4acb14dfd372aa1250935a4ef))
* added ci workflow ([803bcad](https://github.com/sookeke/RfcBuddy/commit/803bcad6cfd737ff58fe3d388e2651ce6f56ebe8))
* added ci workflow ([758ba8e](https://github.com/sookeke/RfcBuddy/commit/758ba8e210579025d43fcc90d6173139927df833))
* added ci workflow ([8f3fcc1](https://github.com/sookeke/RfcBuddy/commit/8f3fcc11af3fc0a30b45819d4a9f831514e1f0bb))
* added ci workflow ([259572b](https://github.com/sookeke/RfcBuddy/commit/259572ba0e265450a559f9290d402c5d254a8556))
* added ci workflow ([01a6816](https://github.com/sookeke/RfcBuddy/commit/01a6816f51eb42767af84067f2c2d8f121297636))
* added ci workflow ([82868dc](https://github.com/sookeke/RfcBuddy/commit/82868dc6d6484e21d529bbc8e9b7ca8024944c95))
* added ci workflow ([88941f2](https://github.com/sookeke/RfcBuddy/commit/88941f2cb974422531631c9cdf5d804cadaa27d9))
* added ci workflow ([74a3ced](https://github.com/sookeke/RfcBuddy/commit/74a3cedf9331ed71febe5327b838571f5c47b44c))
* added ci workflow ([0c5656b](https://github.com/sookeke/RfcBuddy/commit/0c5656b3a9e4b0df6816bf5b8220558f959c828d))
* added ci workflow ([b149490](https://github.com/sookeke/RfcBuddy/commit/b1494901fe60248dbac71fde557e48a2b7e1b592))
27 changes: 27 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Build stage
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR /app

# Install CA certificates so HTTPS requests to CDNs (cdnjs) work
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates \
&& update-ca-certificates \
&& rm -rf /var/lib/apt/lists/*

# Copy csproj files and restore dependencies
COPY src/RfcBuddy.Web/*.csproj ./src/RfcBuddy.Web/
COPY src/RfcBuddy.App/*.csproj ./src/RfcBuddy.App/
COPY src/RfcBuddy.App.Tests/*.csproj ./src/RfcBuddy.App.Tests/
RUN dotnet restore ./src/RfcBuddy.Web/RfcBuddy.Web.csproj

# Copy the rest of the source code
COPY . .

# Build and publish, no need for test
WORKDIR /app/src/RfcBuddy.Web
RUN dotnet publish -c Release -o /out

# Runtime stage
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS runtime
WORKDIR /app
COPY --from=build /out ./
ENTRYPOINT ["dotnet", "RfcBuddy.Web.dll"]
8 changes: 4 additions & 4 deletions RfcBuddy.sln
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.8.34309.116
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RfcBuddy.Web", "RfcBuddy.Web\RfcBuddy.Web.csproj", "{9EBED5DE-596F-4A33-B5E8-AB64201CF1D0}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RfcBuddy.Web", "src\RfcBuddy.Web\RfcBuddy.Web.csproj", "{9EBED5DE-596F-4A33-B5E8-AB64201CF1D0}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RfcBuddy.Web.Tests", "RfcBuddy.Web.Tests\RfcBuddy.Web.Tests.csproj", "{5207412E-86F8-40E9-82AC-55E70C8ED561}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RfcBuddy.Web.Tests", "src\RfcBuddy.Web.Tests\RfcBuddy.Web.Tests.csproj", "{5207412E-86F8-40E9-82AC-55E70C8ED561}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RfcBuddy.App", "RfcBuddy.App\RfcBuddy.App.csproj", "{A04D44CF-571E-426F-8D77-6D1793464D11}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RfcBuddy.App", "src\RfcBuddy.App\RfcBuddy.App.csproj", "{A04D44CF-571E-426F-8D77-6D1793464D11}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RfcBuddy.App.Tests", "RfcBuddy.App.Tests\RfcBuddy.App.Tests.csproj", "{202B571C-B240-44F6-B85A-204FB18A909C}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RfcBuddy.App.Tests", "src\RfcBuddy.App.Tests\RfcBuddy.App.Tests.csproj", "{202B571C-B240-44F6-B85A-204FB18A909C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
84 changes: 84 additions & 0 deletions packages.lock.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
{
"version": 1,
"dependencies": {
"net8.0": {
"DocX": {
"type": "Direct",
"requested": "[4.0.25103.5744, )",
"resolved": "4.0.25103.5744",
"contentHash": "UGW117jq+Jfpr7HNFkROqlpNdeYKbHZRdtZ6b6DjzCcHR+FVzH0HDBN8tj99PMN40tUWSQ01yN8BwZnhBmnbHQ==",
"dependencies": {
"SkiaSharp": "2.88.8",
"System.IO.Packaging": "4.5.0"
}
},
"ExcelDataReader": {
"type": "Direct",
"requested": "[3.6.0, )",
"resolved": "3.6.0",
"contentHash": "eXyxTwG7EEWpgQX3juZ2KcndqTqm/ydx9GXS2lUiMJU54U4h5eXdygRtVgINv0t60ezPWEb+lL7uM7Q+wm5BBA=="
},
"ExcelDataReader.DataSet": {
"type": "Direct",
"requested": "[3.6.0, )",
"resolved": "3.6.0",
"contentHash": "miW3sWmPXnLM38YadRIfnhL4W4QZajpS6Q/OqsOpFJU5ct8h+M/fMpbGMm5INtsMP0Y1k0WK0stIfSW3RP31Xg==",
"dependencies": {
"ExcelDataReader": "3.6.0"
}
},
"Microsoft.Extensions.Configuration.Abstractions": {
"type": "Direct",
"requested": "[8.0.0, )",
"resolved": "8.0.0",
"contentHash": "3lE/iLSutpgX1CC0NOW70FJoGARRHbyKmG7dc0klnUZ9Dd9hS6N/POPWhKhMLCEuNN5nXEY5agmlFtH562vqhQ==",
"dependencies": {
"Microsoft.Extensions.Primitives": "8.0.0"
}
},
"Microsoft.Extensions.Logging.Abstractions": {
"type": "Direct",
"requested": "[8.0.1, )",
"resolved": "8.0.1",
"contentHash": "RIFgaqoaINxkM2KTOw72dmilDmTrYA0ns2KW4lDz4gZ2+o6IQ894CzmdL3StM2oh7QQq44nCWiqKqc4qUI9Jmg==",
"dependencies": {
"Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.1"
}
},
"Microsoft.Extensions.DependencyInjection.Abstractions": {
"type": "Transitive",
"resolved": "8.0.1",
"contentHash": "fGLiCRLMYd00JYpClraLjJTNKLmMJPnqxMaiRzEBIIvevlzxz33mXy39Lkd48hu1G+N21S7QpaO5ZzKsI6FRuA=="
},
"Microsoft.Extensions.Primitives": {
"type": "Transitive",
"resolved": "8.0.0",
"contentHash": "bXJEZrW9ny8vjMF1JV253WeLhpEVzFo1lyaZu1vQ4ZxWUlVvknZ/+ftFgVheLubb4eZPSwwxBeqS1JkCOjxd8g=="
},
"SkiaSharp": {
"type": "Transitive",
"resolved": "2.88.8",
"contentHash": "bRkp3uKp5ZI8gXYQT57uKwil1uobb2p8c69n7v5evlB/2JNcMAXVcw9DZAP5Ig3WSvgzGm2YSn27UVeOi05NlA==",
"dependencies": {
"SkiaSharp.NativeAssets.Win32": "2.88.8",
"SkiaSharp.NativeAssets.macOS": "2.88.8"
}
},
"SkiaSharp.NativeAssets.macOS": {
"type": "Transitive",
"resolved": "2.88.8",
"contentHash": "6Kn5TSkKlfyS6azWHF3Jk2sW5C4jCE5uSshM/5AbfFrR+5n6qM5XEnz9h4VaVl7LTxBvHvMkuPb/3bpbq0vxTw=="
},
"SkiaSharp.NativeAssets.Win32": {
"type": "Transitive",
"resolved": "2.88.8",
"contentHash": "O9QXoWEXA+6cweR4h3BOnwMz+pO9vL9mXdjLrpDd0w1QzCgWmLQBxa1VgySDITiH7nQndrDG1h6937zm9pLj1Q=="
},
"System.IO.Packaging": {
"type": "Transitive",
"resolved": "4.5.0",
"contentHash": "OjtW5pGp1E7KE3ontBrzy+nSFJCM6pcbVDdo3gg4DauTfdtZKdeKvMVlADF4fSY+OfXWUp4qCvOSxIltt37LbA=="
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public void GetSha256HashTest()
[TestMethod()]
public void VerifySha256HashTest()
{
bool value = Cryptography.VerifySha256Hash("Unit Test","4d7eefdafd575f112899dd31e5c9e50203e8d32dcbe7d78967bf8cbddbb0f938");
bool value = Cryptography.VerifySha256Hash("Unit Test", "4d7eefdafd575f112899dd31e5c9e50203e8d32dcbe7d78967bf8cbddbb0f938");
Assert.IsTrue(value);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.2">
<PackageReference Include="coverlet.msbuild" Version="3.2.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="JunitXml.TestLogger" Version="6.1.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.3.1" />
<PackageReference Include="MSTest.TestFramework" Version="3.3.1" />
Expand Down
Loading