Skip to content

Commit 93bdc78

Browse files
Dotnet 9 (#19)
1 parent 4bbdbf9 commit 93bdc78

File tree

5 files changed

+31
-24
lines changed

5 files changed

+31
-24
lines changed

.github/workflows/gh-actions.yml

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,18 @@ on:
66

77
jobs:
88
build:
9-
runs-on: ubuntu-20.04
10-
env:
11-
QC_BITFINEX_API_SECRET: ${{ secrets.QC_BITFINEX_API_SECRET }}
12-
QC_BITFINEX_API_KEY: ${{ secrets.QC_BITFINEX_API_KEY }}
13-
QC_JOB_USER_ID: ${{ secrets.JOB_USER_ID }}
14-
QC_API_ACCESS_TOKEN: ${{ secrets.API_ACCESS_TOKEN }}
15-
QC_JOB_ORGANIZATION_ID: ${{ secrets.JOB_ORGANIZATION_ID }}
16-
container:
17-
image: quantconnect/lean:foundation
9+
runs-on: ubuntu-24.04
1810
steps:
19-
- uses: actions/checkout@v2
11+
- name: Checkout
12+
uses: actions/checkout@v2
13+
14+
- name: Liberate disk space
15+
uses: jlumbroso/free-disk-space@main
16+
with:
17+
tool-cache: true
18+
large-packages: false
19+
docker-images: false
20+
swap-storage: false
2021

2122
- name: Checkout Lean Same Branch
2223
id: lean-same-branch
@@ -37,8 +38,13 @@ jobs:
3738
- name: Move Lean
3839
run: mv Lean ../Lean
3940

40-
- name: Build
41-
run: dotnet build /p:Configuration=Release /v:quiet /p:WarningLevel=1 QuantConnect.BitfinexBrokerage.sln
42-
43-
- name: Run Tests
44-
run: dotnet test ./QuantConnect.BitfinexBrokerage.Tests/bin/Release/QuantConnect.BitfinexBrokerage.Tests.dll
41+
- uses: addnab/docker-run-action@v3
42+
with:
43+
image: quantconnect/lean:foundation
44+
options: --workdir /__w/Lean.Brokerages.Bitfinex/Lean.Brokerages.Bitfinex -v /home/runner/work:/__w -e QC_BITFINEX_API_SECRET=${{ secrets.QC_BITFINEX_API_SECRET }} -e QC_BITFINEX_API_KEY=${{ secrets.QC_BITFINEX_API_KEY }} -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 }}
45+
shell: bash
46+
run: |
47+
# Build
48+
dotnet build /p:Configuration=Release /v:quiet /p:WarningLevel=1 QuantConnect.BitfinexBrokerage.sln && \
49+
# Run Tests
50+
dotnet test ./QuantConnect.BitfinexBrokerage.Tests/bin/Release/QuantConnect.BitfinexBrokerage.Tests.dll

QuantConnect.BitfinexBrokerage.Tests/BitfinexBrokerageTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ protected override IBrokerage CreateBrokerage(IOrderProvider orderProvider, ISec
3939
{
4040
var securities = new SecurityManager(new TimeKeeper(DateTime.UtcNow, TimeZones.NewYork))
4141
{
42-
{Symbol, CreateSecurity(Symbol)}
42+
{Symbol, SecurityProvider.GetSecurity(Symbol)}
4343
};
4444

4545
var transactions = new SecurityTransactionManager(null, securities);

QuantConnect.BitfinexBrokerage.Tests/QuantConnect.BitfinexBrokerage.Tests.csproj

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
55
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
6-
<TargetFramework>net6.0</TargetFramework>
6+
<TargetFramework>net9.0</TargetFramework>
77

88
<IsPackable>false</IsPackable>
99
<Copyright>Copyright © 2021</Copyright>
@@ -18,10 +18,9 @@
1818

1919
<ItemGroup>
2020
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
21-
<PackageReference Include="NUnit" Version="3.13.3" />
22-
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1">
23-
<PrivateAssets>all</PrivateAssets>
24-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
21+
<PackageReference Include="NUnit" Version="4.2.2" />
22+
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0">
23+
<PrivateAssets>all</PrivateAssets>
2524
</PackageReference>
2625
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.4" />
2726
</ItemGroup>
@@ -31,7 +30,9 @@
3130
<ProjectReference Include="..\QuantConnect.BitfinexBrokerage.ToolBox\QuantConnect.BitfinexBrokerage.ToolBox.csproj" />
3231
<ProjectReference Include="..\QuantConnect.BitfinexBrokerage\QuantConnect.BitfinexBrokerage.csproj" />
3332
</ItemGroup>
34-
33+
<ItemGroup>
34+
<Using Include="NUnit.Framework.Legacy.ClassicAssert" Alias="Assert" />
35+
</ItemGroup>
3536
<ItemGroup>
3637
<None Remove="config.json" />
3738
<Content Include="config.json">

QuantConnect.BitfinexBrokerage.ToolBox/QuantConnect.BitfinexBrokerage.ToolBox.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
55
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
66
<OutputType>Exe</OutputType>
7-
<TargetFramework>net6.0</TargetFramework>
7+
<TargetFramework>net9.0</TargetFramework>
88
<Copyright>Copyright © 2021</Copyright>
99
<OutputPath>bin\$(Configuration)\</OutputPath>
1010
<Product>QuantConnect.BitfinexBrokerage.ToolBox</Product>

QuantConnect.BitfinexBrokerage/QuantConnect.BitfinexBrokerage.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<PropertyGroup>
33
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
44
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
5-
<TargetFramework>net6.0</TargetFramework>
5+
<TargetFramework>net9.0</TargetFramework>
66
<Product>QuantConnect.BitfinexBrokerage</Product>
77
<AssemblyName>QuantConnect.BitfinexBrokerage</AssemblyName>
88
<RootNamespace>QuantConnect.BitfinexBrokerage</RootNamespace>

0 commit comments

Comments
 (0)