feat: streamline release workflow and remove unnecessary warnings in test files

This commit is contained in:
Miha Kralj
2026-01-21 23:27:03 -06:00
parent da4e56bf40
commit 0c3b944485
9 changed files with 21 additions and 21 deletions
+21 -12
View File
@@ -2,14 +2,6 @@ name: Release Workflow
on:
workflow_dispatch:
# inputs:
# release_type:
# description: "Release type"
# type: choice
# options:
# - development
# - production
# default: development
permissions: {}
@@ -90,8 +82,25 @@ jobs:
ls -lh lib/bin/Release/*.nupkg || true
- name: Detect release type
id: release_type
run: |
BRANCH="${GITHUB_REF_NAME}"
PRERELEASE_TAG="${{ steps.gitversion.outputs.PreReleaseTag }}"
echo "Branch: $BRANCH"
echo "PreReleaseTag: $PRERELEASE_TAG"
if [ "$BRANCH" = "main" ]; then
echo "type=production" >> $GITHUB_OUTPUT
echo "Detected: PRODUCTION release (main branch)"
else
echo "type=development" >> $GITHUB_OUTPUT
echo "Detected: DEVELOPMENT release (branch=$BRANCH)"
fi
- name: Create Development Release
if: inputs.release_type == 'development'
if: steps.release_type.outputs.type == 'development'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
@@ -108,7 +117,7 @@ jobs:
quantower/bin/Release/**/*.dll
- name: Push to MyGet
if: inputs.release_type == 'development'
if: steps.release_type.outputs.type == 'development'
continue-on-error: true
env:
MYGET_API_KEY: ${{ secrets.MYGET_DEPLOY_KEY_QUANTALIB }}
@@ -124,7 +133,7 @@ jobs:
--api-key "$MYGET_API_KEY"
- name: Create Production Release
if: inputs.release_type == 'production'
if: steps.release_type.outputs.type == 'production'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
@@ -135,7 +144,7 @@ jobs:
quantower/bin/Release/**/*.dll
- name: Push to NuGet
if: inputs.release_type == 'production'
if: steps.release_type.outputs.type == 'production'
env:
NUGET_API_KEY: ${{ secrets.NUGET_DEPLOY_KEY_QUANTLIB }}
run: |
-2
View File
@@ -11,7 +11,6 @@ namespace QuanTAlib;
/// </summary>
[SkipLocalsInit]
#pragma warning disable S101 // Rename class 'GBM' to match pascal case naming rules
#pragma warning disable S2245 // Random is acceptable for simulation/testing purposes
public sealed class GBM : IFeed
#pragma warning restore S101
{
@@ -406,4 +405,3 @@ public sealed class GBM : IFeed
_lastTime = currentTime - timeStep; // Last bar time, not next bar time
}
}
#pragma warning restore S2245
-1
View File
@@ -1,6 +1,5 @@
namespace QuanTAlib.Tests;
#pragma warning disable S2245 // Random is acceptable for simulation/testing purposes
public class BesselTests
{
[Fact]
-1
View File
@@ -1,6 +1,5 @@
namespace QuanTAlib.Tests;
#pragma warning disable S2245 // Random is acceptable for simulation/testing purposes
public class SsfTests
{
[Fact]
-1
View File
@@ -1,6 +1,5 @@
namespace QuanTAlib.Tests;
#pragma warning disable S2245 // Random is acceptable for simulation/testing purposes
public class PwmaTests
{
[Fact]
-1
View File
@@ -1,6 +1,5 @@
namespace QuanTAlib.Tests;
#pragma warning disable S2245 // Random is acceptable for simulation/testing purposes
public class SmaTests
{
[Fact]
-1
View File
@@ -1,7 +1,6 @@
namespace QuanTAlib.Tests;
#pragma warning disable S2245 // Random is acceptable for simulation/testing purposes
public class DemaTests
{
[Fact]
-1
View File
@@ -1,6 +1,5 @@
namespace QuanTAlib.Tests;
#pragma warning disable S2245 // GBM provides deterministic random walks for testing; System.Random usage is controlled
public class EmaTests
{
[Fact]
-1
View File
@@ -1,6 +1,5 @@
namespace QuanTAlib.Tests;
#pragma warning disable S2245 // Random is acceptable for simulation/testing purposes
public class RmaTests
{
[Fact]