mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-19 11:41:30 +00:00
Update dependencies (#1093)
* Update dependencies of lighthouse * Fix race condition in test * Stop using async void in tests. * Hopefully fix qodana issues * Disable qodana PR-mode * Suppress license issue in qodana as not a problem * Exclude svg files from qodana scans
This commit is contained in:
parent
9258469a1d
commit
92ce4c5af5
9 changed files with 52 additions and 45 deletions
4
.github/workflows/qodana_code_quality.yml
vendored
4
.github/workflows/qodana_code_quality.yml
vendored
|
@ -25,11 +25,9 @@ jobs:
|
||||||
fetch-depth: 0 # a full history is required for pull request analysis
|
fetch-depth: 0 # a full history is required for pull request analysis
|
||||||
- name: 'Qodana Scan'
|
- name: 'Qodana Scan'
|
||||||
uses: JetBrains/qodana-action@v2024.3
|
uses: JetBrains/qodana-action@v2024.3
|
||||||
with:
|
|
||||||
pr-mode: false
|
|
||||||
env:
|
env:
|
||||||
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN_1488465344 }}
|
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN_1488465344 }}
|
||||||
QODANA_ENDPOINT: 'https://qodana.cloud'
|
QODANA_ENDPOINT: 'https://api.qodana.cloud'
|
||||||
- uses: github/codeql-action/upload-sarif@v3
|
- uses: github/codeql-action/upload-sarif@v3
|
||||||
with:
|
with:
|
||||||
sarif_file: ${{ runner.temp }}/qodana/results/qodana.sarif.json
|
sarif_file: ${{ runner.temp }}/qodana/results/qodana.sarif.json
|
||||||
|
|
|
@ -11,6 +11,6 @@
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\ProjectLighthouse.Localization\ProjectLighthouse.Localization.csproj" />
|
<ProjectReference Include="..\ProjectLighthouse.Localization\ProjectLighthouse.Localization.csproj" />
|
||||||
<ProjectReference Include="..\ProjectLighthouse\ProjectLighthouse.csproj" />
|
<ProjectReference Include="..\ProjectLighthouse\ProjectLighthouse.csproj" />
|
||||||
<PackageReference Include="QRCoder" Version="1.5.1" />
|
<PackageReference Include="QRCoder" Version="1.6.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -8,19 +8,19 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="JetBrains.Annotations" Version="2023.3.0" />
|
<PackageReference Include="JetBrains.Annotations" Version="2024.3.0" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.6" />
|
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.18" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.6">
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.18">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
|
||||||
<PackageReference Include="xunit" Version="2.8.1" />
|
<PackageReference Include="xunit" Version="2.9.3" />
|
||||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.1">
|
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.1">
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="coverlet.collector" Version="6.0.2">
|
<PackageReference Include="coverlet.collector" Version="6.0.4">
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
|
|
|
@ -26,7 +26,11 @@ public class AuthenticationTests : LighthouseWebTest
|
||||||
string password = CryptoHelper.Sha256Hash(CryptoHelper.GenerateRandomBytes(64).ToArray());
|
string password = CryptoHelper.Sha256Hash(CryptoHelper.GenerateRandomBytes(64).ToArray());
|
||||||
UserEntity user = await database.CreateUser($"unitTestUser{CryptoHelper.GenerateRandomInt32()}", CryptoHelper.BCryptHash(CryptoHelper.Sha256Hash(password)));
|
UserEntity user = await database.CreateUser($"unitTestUser{CryptoHelper.GenerateRandomInt32()}", CryptoHelper.BCryptHash(CryptoHelper.Sha256Hash(password)));
|
||||||
|
|
||||||
this.Driver.Navigate().GoToUrl(this.BaseAddress + "/login");
|
// Sometimes not having this causes a race condition
|
||||||
|
// ReSharper disable once MethodHasAsyncOverload
|
||||||
|
database.SaveChanges();
|
||||||
|
|
||||||
|
await this.Driver.Navigate().GoToUrlAsync(this.BaseAddress + "/login");
|
||||||
|
|
||||||
this.Driver.FindElement(By.Id("text")).SendKeys(user.Username);
|
this.Driver.FindElement(By.Id("text")).SendKeys(user.Username);
|
||||||
this.Driver.FindElement(By.Id("password")).SendKeys(password);
|
this.Driver.FindElement(By.Id("password")).SendKeys(password);
|
||||||
|
|
|
@ -8,21 +8,21 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="JetBrains.Annotations" Version="2023.3.0" />
|
<PackageReference Include="JetBrains.Annotations" Version="2024.3.0" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.6" />
|
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.18" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.6">
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.18">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
|
||||||
<PackageReference Include="Selenium.WebDriver" Version="4.21.0" />
|
<PackageReference Include="Selenium.WebDriver" Version="4.34.0" />
|
||||||
<PackageReference Include="Selenium.WebDriver.ChromeDriver" Version="125.0.6422.14100" />
|
<PackageReference Include="Selenium.WebDriver.ChromeDriver" Version="138.0.7204.9400" />
|
||||||
<PackageReference Include="xunit" Version="2.8.1" />
|
<PackageReference Include="xunit" Version="2.9.3" />
|
||||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.1">
|
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.1">
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="coverlet.collector" Version="6.0.2">
|
<PackageReference Include="coverlet.collector" Version="6.0.4">
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
|
|
|
@ -13,23 +13,23 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="JetBrains.Annotations" Version="2023.3.0" />
|
<PackageReference Include="JetBrains.Annotations" Version="2024.3.0" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.6" />
|
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.18" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.6">
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.18">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
|
||||||
<PackageReference Include="xunit" Version="2.8.1" />
|
<PackageReference Include="xunit" Version="2.9.3" />
|
||||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.1">
|
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.1">
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="coverlet.collector" Version="6.0.2">
|
<PackageReference Include="coverlet.collector" Version="6.0.4">
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Moq" Version="4.20.70" />
|
<PackageReference Include="Moq" Version="4.20.72" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.6" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.6" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
using System;
|
using System;
|
||||||
|
using System.Threading.Tasks;
|
||||||
using LBPUnion.ProjectLighthouse.Administration.Maintenance.RepeatingTasks;
|
using LBPUnion.ProjectLighthouse.Administration.Maintenance.RepeatingTasks;
|
||||||
using LBPUnion.ProjectLighthouse.Database;
|
using LBPUnion.ProjectLighthouse.Database;
|
||||||
using LBPUnion.ProjectLighthouse.Tests.Helpers;
|
using LBPUnion.ProjectLighthouse.Tests.Helpers;
|
||||||
|
@ -12,7 +13,7 @@ namespace LBPUnion.ProjectLighthouse.Tests.Unit;
|
||||||
public class ModerationTests
|
public class ModerationTests
|
||||||
{
|
{
|
||||||
[Fact]
|
[Fact]
|
||||||
public async void DismissExpiredCases_ShouldDismissExpiredCase()
|
public async Task DismissExpiredCases_ShouldDismissExpiredCase()
|
||||||
{
|
{
|
||||||
await using DatabaseContext database = await MockHelper.GetTestDatabase();
|
await using DatabaseContext database = await MockHelper.GetTestDatabase();
|
||||||
|
|
||||||
|
@ -35,7 +36,7 @@ public class ModerationTests
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public async void DismissExpiredCases_ShouldNotDismissActiveCase()
|
public async Task DismissExpiredCases_ShouldNotDismissActiveCase()
|
||||||
{
|
{
|
||||||
await using DatabaseContext database = await MockHelper.GetTestDatabase();
|
await using DatabaseContext database = await MockHelper.GetTestDatabase();
|
||||||
|
|
||||||
|
@ -58,7 +59,7 @@ public class ModerationTests
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public async void DismissExpiredCases_ShouldNotDismissAlreadyDismissedCase()
|
public async Task DismissExpiredCases_ShouldNotDismissAlreadyDismissedCase()
|
||||||
{
|
{
|
||||||
await using DatabaseContext database = await MockHelper.GetTestDatabase();
|
await using DatabaseContext database = await MockHelper.GetTestDatabase();
|
||||||
|
|
||||||
|
|
|
@ -10,26 +10,26 @@
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="BCrypt.Net-Next" Version="4.0.3" />
|
<PackageReference Include="BCrypt.Net-Next" Version="4.0.3" />
|
||||||
<PackageReference Include="GitInfo" Version="3.3.5">
|
<PackageReference Include="GitInfo" Version="3.5.0">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Pfim" Version="0.11.2" />
|
<PackageReference Include="Pfim" Version="0.11.3" />
|
||||||
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.5" />
|
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.10" />
|
||||||
<PackageReference Include="Discord.Net.Webhook" Version="3.15.0" />
|
<PackageReference Include="Discord.Net.Webhook" Version="3.17.4" />
|
||||||
<PackageReference Include="JetBrains.Annotations" Version="2023.3.0" />
|
<PackageReference Include="JetBrains.Annotations" Version="2024.3.0" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="8.0.6" />
|
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="8.0.18" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.6" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.18" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.6">
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.18">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="8.0.2" />
|
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="8.0.2" />
|
||||||
<PackageReference Include="Redis.OM" Version="0.7.1" />
|
<PackageReference Include="Redis.OM" Version="1.0.1" />
|
||||||
<PackageReference Include="SharpZipLib" Version="1.4.2" />
|
<PackageReference Include="SharpZipLib" Version="1.4.2" />
|
||||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.6.2" />
|
<PackageReference Include="Swashbuckle.AspNetCore" Version="9.0.3" />
|
||||||
<PackageReference Include="YamlDotNet" Version="15.1.6" />
|
<PackageReference Include="YamlDotNet" Version="16.3.0" />
|
||||||
<PackageReference Include="BouncyCastle.Cryptography" Version="2.4.0" />
|
<PackageReference Include="BouncyCastle.Cryptography" Version="2.6.1" />
|
||||||
<PackageReference Include="DistributedLock.MySql" Version="1.0.2" />
|
<PackageReference Include="DistributedLock.MySql" Version="1.0.2" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
version: "1.0"
|
version: "1.0"
|
||||||
linter: jetbrains/qodana-dotnet:2024.1
|
linter: jetbrains/qodana-dotnet:2024.3
|
||||||
profile:
|
profile:
|
||||||
name: qodana.recommended
|
name: qodana.recommended
|
||||||
include:
|
include:
|
||||||
|
@ -9,3 +9,7 @@ exclude:
|
||||||
paths:
|
paths:
|
||||||
- ProjectLighthouse.Localization
|
- ProjectLighthouse.Localization
|
||||||
- ProjectLighthouse/Migrations
|
- ProjectLighthouse/Migrations
|
||||||
|
- ProjectLighthouse/StaticFiles/css/themes
|
||||||
|
- ProjectLighthouse/StaticFiles/safari-pinned-tab.svg
|
||||||
|
dependencyIgnores:
|
||||||
|
- name: "SixLabors.ImageSharp" # We're open source, so we come under the Apache License
|
Loading…
Add table
Add a link
Reference in a new issue