Skip to content

Commit

Permalink
Dotnet 9
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin-Molinero committed Dec 24, 2024
1 parent dacd240 commit 4dc0a35
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 18 deletions.
35 changes: 23 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,18 @@ on:

jobs:
build:
runs-on: ubuntu-20.04
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
Expand All @@ -33,11 +40,15 @@ jobs:
- name: Move Lean
run: mv Lean ../Lean

- name: BuildDataSource
run: dotnet build ./QuantConnect.DataSource.csproj /p:Configuration=Release /v:quiet /p:WarningLevel=1

- name: BuildTests
run: dotnet build ./tests/Tests.csproj /p:Configuration=Release /v:quiet /p:WarningLevel=1

- name: Run Tests
run: dotnet test ./tests/bin/Release/net6.0/Tests.dll
- uses: addnab/docker-run-action@v3
with:
image: quantconnect/lean:foundation
options: --workdir /__w/Lean.DataSource.Tiingo/Lean.DataSource.Tiingo -v /home/runner/work:/__w
shell: bash
run: |
# BuildDataSource
dotnet build ./QuantConnect.DataSource.csproj /p:Configuration=Release /v:quiet /p:WarningLevel=1
# BuildTests
dotnet build ./tests/Tests.csproj /p:Configuration=Release /v:quiet /p:WarningLevel=1
# Run Tests
dotnet test ./tests/bin/Release/net9.0/Tests.dll
2 changes: 1 addition & 1 deletion DataProcessing/DataProcessing.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<AssemblyName>process</AssemblyName>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion DataQueueHandlers/DataQueueHandlers.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<RootNamespace>QuantConnect.DataSource.DataQueueHandlers</RootNamespace>
<AssemblyName>QuantConnect.DataSource.DataQueueHandlers.TiingoNews</AssemblyName>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
Expand Down
2 changes: 1 addition & 1 deletion QuantConnect.DataSource.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<RootNamespace>QuantConnect.DataSource</RootNamespace>
<AssemblyName>QuantConnect.DataSource.TiingoNews</AssemblyName>
<OutputPath>bin\$(Configuration)</OutputPath>
Expand Down
9 changes: 6 additions & 3 deletions tests/Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<RootNamespace>QuantConnect.DataLibrary.Tests</RootNamespace>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
Expand All @@ -13,14 +13,17 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="protobuf-net" Version="3.1.33" />
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1">
<PackageReference Include="NUnit" Version="4.2.2" />
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.4" />
<PackageReference Include="Microsoft.TestPlatform.ObjectModel" Version="16.9.4" />
<PackageReference Include="QuantConnect.Algorithm" Version="2.5.*" />
</ItemGroup>
<ItemGroup>
<Using Include="NUnit.Framework.Legacy.ClassicAssert" Alias="Assert" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\QuantConnect.DataSource.csproj" />
<ProjectReference Include="..\DataProcessing\DataProcessing.csproj" />
Expand Down
9 changes: 9 additions & 0 deletions tests/TiingoNewsJsonConverterTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,21 @@
using NUnit.Framework;
using QuantConnect.DataSource;
using QuantConnect.DataProcessing;
using QuantConnect.Data.Auxiliary;
using QuantConnect.Interfaces;
using QuantConnect.Util;

namespace QuantConnect.Tests.Common.Data.Custom
{
[TestFixture]
public class TiingoNewsJsonConverterTests
{
[OneTimeSetUp]
public void Setup()
{
Composer.Instance.GetExportedValueByTypeName<IMapFileProvider>(Configuration.Config.Get("map-file-provider", typeof(LocalDiskMapFileProvider).Name));
}

private static Symbol SymbolAAPL = Symbol.Create("AAPL", SecurityType.Equity, Market.USA);
private static Symbol SymbolSPY = Symbol.Create("SPY", SecurityType.Equity, Market.USA);

Expand Down
9 changes: 9 additions & 0 deletions tests/TiingoNewsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,21 @@
using NUnit.Framework;
using QuantConnect.Data;
using QuantConnect.DataSource;
using QuantConnect.Data.Auxiliary;
using QuantConnect.Interfaces;
using QuantConnect.Util;

namespace QuantConnect.DataLibrary.Tests
{
[TestFixture]
public class TiingoNewsTests
{
[OneTimeSetUp]
public void Setup()
{
Composer.Instance.GetExportedValueByTypeName<IMapFileProvider>(Configuration.Config.Get("map-file-provider", typeof(LocalDiskMapFileProvider).Name));
}

[Test]
public void JsonRoundTrip()
{
Expand Down

0 comments on commit 4dc0a35

Please sign in to comment.