Skip to content
Closed
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
11 changes: 6 additions & 5 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:
uses: actions/setup-dotnet@87b7050bc53ea08284295505d98d2aa94301e852 # v4.2.0
with:
dotnet-version: 9.0.x
cache: true

- name: 'Restore external dependencies'
run: dotnet restore
Expand All @@ -63,19 +64,19 @@ jobs:

- name: 'Test'
id: test
run: dotnet test --no-build --restore --collect:"XPlat Code Coverage" --logger junit
run: dotnet test --no-build --restore --collect:"XPlat Code Coverage" --logger junit tests/UnitTests/BCrypt.Net.UnitTests.csproj

- name: 'Create test summary'
uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4
with:
paths: test/**/TestResults.xml
paths: tests/**/TestResults.xml
show: "fail, skip"
if: always()

- name: 'Generate Coverage Reports'
uses: danielpalme/ReportGenerator-GitHub-Action@c38c522d4b391c1b0da979cbb2e902c0a252a7dc # 5.4.3
with:
reports: "test/**/coverage.cobertura.xml"
reports: "tests/**/coverage.cobertura.xml"
targetdir: "${{ github.workspace }}"
reporttypes: "Cobertura"
verbosity: "Info"
Expand Down Expand Up @@ -110,11 +111,11 @@ jobs:
uses: EnricoMi/publish-unit-test-result-action@170bf24d20d201b842d7a52403b73ed297e6645b # v2.18.0
if: always()
with:
files: "test/**/TestResults.xml"
files: "tests/**/TestResults.xml"

- name: Upload Test Artifacts
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
name: test-results
path: "test/**/TestResults.xml"
path: "tests/**/TestResults.xml"
retention-days: 5
2 changes: 1 addition & 1 deletion .github/workflows/ci-manual-build-test-sign.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
run: dotnet build --configuration Release --property:PublicRelease=${{ inputs.public_release }}

- name: 'Test'
run: dotnet test --configuration Release --no-restore --no-build --property:PublicRelease=${{ inputs.public_release }}
run: dotnet test --configuration Release --no-restore --no-build --property:PublicRelease=${{ inputs.public_release }} tests/UnitTests/BCrypt.Net.UnitTests.csproj

- name: 'Pack release'
run: dotnet pack --configuration Release --no-restore --no-build --output ${{ env.nupkgDirectory }} --property:PublicRelease=${{ inputs.public_release }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ jobs:
uses: actions/setup-dotnet@87b7050bc53ea08284295505d98d2aa94301e852 # v4.2.0
with:
dotnet-version: 9.0.x
cache: true

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/devskim.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: 'MSFT Dev Skim'

on:
workflow_dispatch:
pull_request:
branches:
- 'main'

permissions:
# required for all workflows
security-events: write
# only required for workflows in private repositories
actions: read
contents: read

jobs:
dependency-review:
runs-on: ubuntu-24.04
steps:
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- uses: actions/checkout@v4
- uses: microsoft/DevSkim-Action@v1
- uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: devskim-results.sarif
1 change: 1 addition & 0 deletions .github/workflows/generate-publish-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:
uses: actions/setup-dotnet@87b7050bc53ea08284295505d98d2aa94301e852 # v4.2.0
with:
dotnet-version: 9.0.x
cache: true

- run: dotnet tool update -g docfx
- run: docfx ./docs/docfx.json
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/markdown-link-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ on:
- main
paths:
- '**.md'
schedule:
#schedule:
# Run every-day at 9:00 AM (See https://pubs.opengroup.org/onlinepubs/9699919799/utilities/crontab.html#tag_20_25_07)
- cron: "0 9 * * *"
#- cron: "0 9 * * *"
permissions:
contents: read

Expand Down
12 changes: 6 additions & 6 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@
<ItemGroup>
<PackageVersion Include="DotNet.ReproducibleBuilds" Version="1.2.25" />
<PackageVersion Include="Nerdbank.GitVersioning" Version="3.7.115" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
<PackageVersion Include="SonarAnalyzer.CSharp" Version="10.6.0.109712" />
<PackageVersion Include="DotNetAnalyzers.DocumentationAnalyzers" Version="1.0.0-beta.59" />
<PackageVersion Include="GitHubActionsTestLogger" Version="2.4.1" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageVersion Include="xunit.v3" Version="1.0.1" />
<PackageVersion Include="xunit.runner.visualstudio" Version="3.0.1" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
<PackageVersion Include="xunit.v3" Version="1.1.0" />
<PackageVersion Include="xunit.runner.visualstudio" Version="3.0.2" />
<PackageVersion Include="coverlet.collector" Version="6.0.4" />
<PackageVersion Include="JunitXml.TestLogger" Version="5.0.0" />
<PackageVersion Include="JunitXml.TestLogger" Version="6.0.0" />
<PackageVersion Include="Microsoft.Sbom.Targets" Version="3.0.1" />
<PackageVersion Include="Microsoft.CodeCoverage" Version="17.12.0" />
<PackageVersion Include="Microsoft.CodeCoverage" Version="17.13.0" />
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'net462'">
Expand Down
2 changes: 1 addition & 1 deletion benchmark/BCryptNet.BenchMarks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net48'">
<PackageReference Include="System.Collections.Immutable" Version="9.0.0" />
<PackageReference Include="System.Collections.Immutable" Version="9.0.2" />
<PackageReference Include="System.Reflection.Metadata" Version="9.0.0" />
<PackageReference Include="NETStandard.Library" Version="2.0.3" />
<PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
Expand Down
4 changes: 3 additions & 1 deletion examples/ConsoleApp/ExampleConsoleApp/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
namespace ExampleConsoleApp;
using System;

namespace ExampleConsoleApp;

using BCryptNet;

Expand Down
4 changes: 2 additions & 2 deletions src/BCrypt.Net/BCrypt.Net.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netstandard2.0;netstandard2.1;net9.0</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">netstandard2.0;netstandard2.1;net462;net6.0;net8.0;net9.0</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netstandard2.0;netstandard2.1;net8.0</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">netstandard2.0;netstandard2.1;net462;net8.0</TargetFrameworks>

<AssemblyTitle>BCrypt.Net-Next</AssemblyTitle>
<AssemblyName>BCrypt.Net-Next</AssemblyName>
Expand Down
2 changes: 1 addition & 1 deletion tests/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="JunitXml.TestLogger"/>
<PackageReference Include="GitHubActionsTestLogger" PrivateAssets="all" />
<PackageReference Include="Newtonsoft.Json" />
</ItemGroup>
</Project>
6 changes: 5 additions & 1 deletion tests/UnitTests/BCrypt.Net.UnitTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@
<PropertyGroup>
<AssemblyName>BCrypt.Net.UnitTests</AssemblyName>
<RootNamespace>BCryptNet.UnitTests</RootNamespace>
<TargetFrameworks>net9.0</TargetFrameworks>
<TargetFramework>net9.0</TargetFramework>
<Configurations>Debug</Configurations>
<LangVersion>default</LangVersion>

<UseMicrosoftTestingPlatformRunner>true</UseMicrosoftTestingPlatformRunner>
<OutputType>Exe</OutputType>
<TestingPlatformDotnetTestSupport>true</TestingPlatformDotnetTestSupport>

<DebugType>Full</DebugType>
<DefineConstants Condition="'$(OS)' == 'Windows_NT'">$(DefineConstants);WINDOWS</DefineConstants>
</PropertyGroup>
Expand Down
1 change: 1 addition & 0 deletions tests/UnitTests/BCryptTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ IN THE SOFTWARE.
using System.Diagnostics.CodeAnalysis;
using System.Security.Cryptography;
using System.Text;
using Xunit;

namespace BCryptNet.UnitTests
{
Expand Down
1 change: 1 addition & 0 deletions tests/UnitTests/BCryptTestsExtendedv3.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ IN THE SOFTWARE.
using System.Diagnostics.CodeAnalysis;
using System.Security.Cryptography;
using System.Text;
using Xunit;

namespace BCryptNet.UnitTests
{
Expand Down
1 change: 1 addition & 0 deletions tests/UnitTests/Base64Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

using System;
using System.Text;
using Xunit;

namespace BCryptNet.UnitTests;

Expand Down
Loading