Skip to content

Commit caafd4a

Browse files
committed
Merge branch 'main' into net10
2 parents c52d57a + 1c4fba6 commit caafd4a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+210
-120
lines changed

.github/workflows/crowdin-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
submodules: recursive
2121

2222
- name: Upload latest strings for translation on Crowdin
23-
uses: crowdin/github-action@0749939f635900a2521aa6aac7a3766642b2dc71 # v2.11.0
23+
uses: crowdin/github-action@08713f00a50548bfe39b37e8f44afb53e7a802d4 # v2.12.0
2424
with:
2525
crowdin_branch_name: main
2626
config: '.github/crowdin.yml'

.github/workflows/docker-publish-latest.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ jobs:
2727
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
2828

2929
- name: Login to ghcr.io
30-
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0
30+
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
3131
with:
3232
registry: ghcr.io
3333
username: ${{ github.actor }}
3434
password: ${{ secrets.GITHUB_TOKEN }}
3535

3636
- name: Login to DockerHub
37-
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0
37+
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
3838
with:
3939
username: ${{ secrets.DOCKERHUB_USERNAME }}
4040
password: ${{ secrets.DOCKERHUB_TOKEN }}

.github/workflows/docker-publish-main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ jobs:
2828
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
2929

3030
- name: Login to ghcr.io
31-
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0
31+
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
3232
with:
3333
registry: ghcr.io
3434
username: ${{ github.actor }}
3535
password: ${{ secrets.GITHUB_TOKEN }}
3636

3737
- name: Login to DockerHub
38-
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0
38+
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
3939
with:
4040
username: ${{ secrets.DOCKERHUB_USERNAME }}
4141
password: ${{ secrets.DOCKERHUB_TOKEN }}
@@ -69,7 +69,7 @@ jobs:
6969
push: true
7070

7171
- name: Update DockerHub repository description
72-
uses: peter-evans/dockerhub-description@432a30c9e07499fd01da9f8a49f0faf9e0ca5b77 # v4.0.2
72+
uses: peter-evans/dockerhub-description@1b9a80c056b620d92cedb9d9b5a223409c68ddfa # v5.0.0
7373
with:
7474
username: ${{ secrets.DOCKERHUB_USERNAME }}
7575
password: ${{ secrets.DOCKERHUB_TOKEN }}

.github/workflows/docker-publish-released.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ jobs:
2828
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
2929

3030
- name: Login to ghcr.io
31-
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0
31+
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
3232
with:
3333
registry: ghcr.io
3434
username: ${{ github.actor }}
3535
password: ${{ secrets.GITHUB_TOKEN }}
3636

3737
- name: Login to DockerHub
38-
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0
38+
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
3939
with:
4040
username: ${{ secrets.DOCKERHUB_USERNAME }}
4141
password: ${{ secrets.DOCKERHUB_TOKEN }}

.github/workflows/publish.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
submodules: recursive
2626

2727
- name: Setup Node.js with npm
28-
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
28+
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
2929
with:
3030
check-latest: true
3131
node-version: ${{ env.NODE_JS_VERSION }}
@@ -43,7 +43,7 @@ jobs:
4343
run: npm run-script deploy --no-progress --prefix ASF-ui
4444

4545
- name: Upload ASF-ui
46-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
46+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
4747
with:
4848
compression-level: 1
4949
if-no-files-found: error
@@ -95,7 +95,7 @@ jobs:
9595
run: dotnet --info
9696

9797
- name: Download previously built ASF-ui
98-
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
98+
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
9999
with:
100100
name: ASF-ui
101101
path: ASF-ui/dist
@@ -367,7 +367,7 @@ jobs:
367367
subject-path: out/ASF-${{ matrix.variant }}.zip
368368

369369
- name: Upload ASF-${{ matrix.variant }}
370-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
370+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
371371
with:
372372
compression-level: 1
373373
if-no-files-found: error
@@ -416,7 +416,7 @@ jobs:
416416

417417
- name: Upload ArchiSteamFarm.OfficialPlugins.Monitoring
418418
if: ${{ matrix.os == 'ubuntu-latest' && matrix.variant == 'generic' }}
419-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
419+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
420420
with:
421421
compression-level: 1
422422
if-no-files-found: error
@@ -441,55 +441,55 @@ jobs:
441441
show-progress: false
442442

443443
- name: Download ASF-generic artifact from ubuntu-latest
444-
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
444+
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
445445
with:
446446
name: ubuntu-latest_ASF-generic
447447
path: out
448448

449449
- name: Download ASF-linux-arm artifact from ubuntu-latest
450-
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
450+
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
451451
with:
452452
name: ubuntu-latest_ASF-linux-arm
453453
path: out
454454

455455
- name: Download ASF-linux-arm64 artifact from ubuntu-latest
456-
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
456+
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
457457
with:
458458
name: ubuntu-latest_ASF-linux-arm64
459459
path: out
460460

461461
- name: Download ASF-linux-x64 artifact from ubuntu-latest
462-
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
462+
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
463463
with:
464464
name: ubuntu-latest_ASF-linux-x64
465465
path: out
466466

467467
- name: Download ASF-osx-arm64 artifact from macos-latest
468-
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
468+
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
469469
with:
470470
name: macos-latest_ASF-osx-arm64
471471
path: out
472472

473473
- name: Download ASF-osx-x64 artifact from macos-latest
474-
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
474+
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
475475
with:
476476
name: macos-latest_ASF-osx-x64
477477
path: out
478478

479479
- name: Download ASF-win-arm64 artifact from windows-latest
480-
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
480+
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
481481
with:
482482
name: windows-latest_ASF-win-arm64
483483
path: out
484484

485485
- name: Download ASF-win-x64 artifact from windows-latest
486-
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
486+
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
487487
with:
488488
name: windows-latest_ASF-win-x64
489489
path: out
490490

491491
- name: Download ArchiSteamFarm.OfficialPlugins.Monitoring artifact
492-
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
492+
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
493493
with:
494494
name: ArchiSteamFarm.OfficialPlugins.Monitoring
495495
path: out
@@ -514,7 +514,7 @@ jobs:
514514
subject-path: out/SHA512SUMS
515515

516516
- name: Upload SHA512SUMS
517-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
517+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
518518
with:
519519
compression-level: 1
520520
if-no-files-found: error
@@ -527,7 +527,7 @@ jobs:
527527
subject-path: out/SHA512SUMS.sign
528528

529529
- name: Upload SHA512SUMS.sign
530-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
530+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
531531
with:
532532
compression-level: 1
533533
if-no-files-found: error

.github/workflows/translations.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
git reset --hard origin/master
3232
3333
- name: Download latest translations from Crowdin
34-
uses: crowdin/github-action@0749939f635900a2521aa6aac7a3766642b2dc71 # v2.11.0
34+
uses: crowdin/github-action@08713f00a50548bfe39b37e8f44afb53e7a802d4 # v2.12.0
3535
with:
3636
upload_sources: false
3737
download_translations: true

ArchiSteamFarm.Tests/ArchiCryptoHelper.cs

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,28 @@ internal async Task CanEncryptDecrypt(ECryptoMethod cryptoMethod) {
5454

5555
[TestMethod]
5656
internal async Task CanEncryptDecryptProtectedDataForCurrentUser() {
57+
// Not supported on other platforms than Windows
5758
if (!OperatingSystem.IsWindows()) {
58-
// Not supported on other platforms than Windows
59-
return;
59+
Assert.Inconclusive($"!{nameof(OperatingSystem.IsWindows)}");
6060
}
6161

6262
await CanEncryptDecrypt(ECryptoMethod.ProtectedDataForCurrentUser).ConfigureAwait(false);
6363
}
64+
65+
[DataRow(EHashingMethod.PlainText, TestPassword)]
66+
[DataRow(EHashingMethod.Pbkdf2, "WlS48GNrs1hAhcNHPfV09TPTLhf03gExb6zpaKiwX5A=")]
67+
[DataRow(EHashingMethod.SCrypt, "9LjhjyugakDQ7Haq/ufyTZDfIGeeWbLcE+/9IeKm8gc=")]
68+
[TestMethod]
69+
internal void CanHash(EHashingMethod hashingMethod, string expectedHash) {
70+
if (!Enum.IsDefined(hashingMethod)) {
71+
throw new InvalidEnumArgumentException(nameof(hashingMethod), (int) hashingMethod, typeof(EHashingMethod));
72+
}
73+
74+
ArgumentException.ThrowIfNullOrEmpty(expectedHash);
75+
76+
string hashed = Hash(hashingMethod, TestPassword);
77+
78+
Assert.AreEqual(expectedHash, hashed);
79+
}
6480
}
6581
#pragma warning restore CA1812 // False positive, the class is used during MSTest

ArchiSteamFarm.Tests/Bot.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ private static void AssertResultMatchesExpectation(Dictionary<(uint RealAppID, u
526526
ArgumentNullException.ThrowIfNull(itemsToSend);
527527

528528
Dictionary<(uint RealAppID, ulong ContextID, ulong ClassID), long> realResult = itemsToSend.GroupBy(static asset => (asset.RealAppID, asset.ContextID, asset.ClassID)).ToDictionary(static group => group.Key, static group => group.Sum(static asset => asset.Amount));
529-
Assert.AreEqual(expectedResult.Count, realResult.Count);
529+
Assert.HasCount(expectedResult.Count, realResult);
530530
Assert.IsTrue(expectedResult.All(expectation => realResult.TryGetValue(expectation.Key, out long reality) && (expectation.Value == reality)));
531531
}
532532

ArchiSteamFarm.Tests/IGitHubPluginUpdates.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ internal sealed class IGitHubPluginUpdates {
4444

4545
private readonly TestContext TestContext;
4646

47-
private CancellationToken CancellationToken => TestContext.CancellationTokenSource.Token;
47+
private CancellationToken CancellationToken => TestContext.CancellationToken;
4848

4949
[UsedImplicitly]
5050
public IGitHubPluginUpdates(TestContext testContext) {

0 commit comments

Comments
 (0)