From adb67b622244e74f97bace1ea4e5f95c08a42e9c Mon Sep 17 00:00:00 2001 From: Martin-Molinero Date: Thu, 19 Dec 2024 14:05:42 -0300 Subject: [PATCH] Dotnet 9 (#50) --- .github/workflows/gh-actions.yml | 36 +++++++++++-------- .../KrakenBrokerageTests.cs | 2 +- .../QuantConnect.KrakenBrokerage.Tests.csproj | 10 +++--- ...uantConnect.KrakenBrokerage.ToolBox.csproj | 2 +- .../QuantConnect.KrakenBrokerage.csproj | 2 +- 5 files changed, 30 insertions(+), 22 deletions(-) diff --git a/.github/workflows/gh-actions.yml b/.github/workflows/gh-actions.yml index 16feac7..93bf37f 100644 --- a/.github/workflows/gh-actions.yml +++ b/.github/workflows/gh-actions.yml @@ -6,17 +6,18 @@ on: jobs: build: - runs-on: ubuntu-20.04 - env: - KRAKEN_PUBLIC: ${{ secrets.KRAKEN_PUBLIC }} - KRAKEN_PRIVATE: ${{ secrets.KRAKEN_PRIVATE }} - QC_JOB_USER_ID: ${{ secrets.JOB_USER_ID }} - QC_API_ACCESS_TOKEN: ${{ secrets.API_ACCESS_TOKEN }} - QC_JOB_ORGANIZATION_ID: ${{ secrets.JOB_ORGANIZATION_ID }} - container: - image: quantconnect/lean:foundation + runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v2 + - name: Checkout + uses: actions/checkout@v2 + + - name: Liberate disk space + uses: jlumbroso/free-disk-space@main + with: + tool-cache: true + large-packages: false + docker-images: false + swap-storage: false - name: Checkout Lean Same Branch id: lean-same-branch @@ -37,8 +38,13 @@ jobs: - name: Move Lean run: mv Lean ../Lean - - name: Build - run: dotnet build /p:Configuration=Release /v:quiet /p:WarningLevel=1 QuantConnect.KrakenBrokerage.sln - - - name: Run Tests - run: dotnet test ./QuantConnect.KrakenBrokerage.Tests/bin/Release/QuantConnect.KrakenBrokerage.Tests.dll + - uses: addnab/docker-run-action@v3 + with: + image: quantconnect/lean:foundation + options: --workdir /__w/Lean.Brokerages.Kraken/Lean.Brokerages.Kraken -v /home/runner/work:/__w -e KRAKEN_PUBLIC=${{ secrets.KRAKEN_PUBLIC }} -e KRAKEN_PRIVATE=${{ secrets.KRAKEN_PRIVATE }} -e QC_JOB_USER_ID=${{ secrets.JOB_USER_ID }} -e QC_API_ACCESS_TOKEN=${{ secrets.API_ACCESS_TOKEN }} -e QC_JOB_ORGANIZATION_ID=${{ secrets.JOB_ORGANIZATION_ID }} + shell: bash + run: | + # Build + dotnet build /p:Configuration=Release /v:quiet /p:WarningLevel=1 QuantConnect.KrakenBrokerage.sln && \ + # Run Tests + dotnet test ./QuantConnect.KrakenBrokerage.Tests/bin/Release/QuantConnect.KrakenBrokerage.Tests.dll diff --git a/QuantConnect.KrakenBrokerage.Tests/KrakenBrokerageTests.cs b/QuantConnect.KrakenBrokerage.Tests/KrakenBrokerageTests.cs index aab51e0..79a9910 100644 --- a/QuantConnect.KrakenBrokerage.Tests/KrakenBrokerageTests.cs +++ b/QuantConnect.KrakenBrokerage.Tests/KrakenBrokerageTests.cs @@ -48,7 +48,7 @@ protected override IBrokerage CreateBrokerage(IOrderProvider orderProvider, ISec var securities = new SecurityManager(new TimeKeeper(DateTime.UtcNow, TimeZones.NewYork)) { - {Symbol, CreateSecurity(Symbol)} + {Symbol, SecurityProvider.GetSecurity(Symbol)} }; securities[Symbol].MarginModel = new SecurityMarginModel(leverage: Leverage); diff --git a/QuantConnect.KrakenBrokerage.Tests/QuantConnect.KrakenBrokerage.Tests.csproj b/QuantConnect.KrakenBrokerage.Tests/QuantConnect.KrakenBrokerage.Tests.csproj index 6c69402..ae48a02 100644 --- a/QuantConnect.KrakenBrokerage.Tests/QuantConnect.KrakenBrokerage.Tests.csproj +++ b/QuantConnect.KrakenBrokerage.Tests/QuantConnect.KrakenBrokerage.Tests.csproj @@ -3,7 +3,7 @@ Release AnyCPU - net6.0 + net9.0 false Copyright © 2021 @@ -18,13 +18,15 @@ - - + + all - runtime; build; native; contentfiles; analyzers; buildtransitive + + + diff --git a/QuantConnect.KrakenBrokerage.ToolBox/QuantConnect.KrakenBrokerage.ToolBox.csproj b/QuantConnect.KrakenBrokerage.ToolBox/QuantConnect.KrakenBrokerage.ToolBox.csproj index e166268..59f14b9 100644 --- a/QuantConnect.KrakenBrokerage.ToolBox/QuantConnect.KrakenBrokerage.ToolBox.csproj +++ b/QuantConnect.KrakenBrokerage.ToolBox/QuantConnect.KrakenBrokerage.ToolBox.csproj @@ -4,7 +4,7 @@ Release AnyCPU Exe - net6.0 + net9.0 Copyright © 2021 bin\$(Configuration)\ QuantConnect.KrakenBrokerage.ToolBox diff --git a/QuantConnect.KrakenBrokerage/QuantConnect.KrakenBrokerage.csproj b/QuantConnect.KrakenBrokerage/QuantConnect.KrakenBrokerage.csproj index 080fd92..3afe35d 100644 --- a/QuantConnect.KrakenBrokerage/QuantConnect.KrakenBrokerage.csproj +++ b/QuantConnect.KrakenBrokerage/QuantConnect.KrakenBrokerage.csproj @@ -2,7 +2,7 @@ Release AnyCPU - net6.0 + net9.0 QuantConnect.KrakenBrokerage QuantConnect.KrakenBrokerage QuantConnect.KrakenBrokerage