Skip to content

Commit

Permalink
Dotnet 9 (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin-Molinero authored Dec 23, 2024
1 parent 5962100 commit ef404d5
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 44 deletions.
52 changes: 18 additions & 34 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,44 +8,28 @@ on:

jobs:
build:
runs-on: ubuntu-20.04

runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Free space
run: df -h && rm -rf /opt/hostedtoolcache* && df -h

- name: Pull Foundation Image
uses: addnab/docker-run-action@v3
with:
image: quantconnect/lean:foundation

- name: Checkout Lean Same Branch
id: lean-same-branch
uses: actions/checkout@v2
continue-on-error: true
- name: Liberate disk space
uses: jlumbroso/free-disk-space@main
with:
ref: ${{ github.ref }}
repository: QuantConnect/Lean
path: Lean
tool-cache: true
large-packages: false
docker-images: false
swap-storage: false

- name: Checkout Lean Master
if: steps.lean-same-branch.outcome != 'success'
uses: actions/checkout@v2
- uses: addnab/docker-run-action@v3
with:
repository: QuantConnect/Lean
path: Lean

- 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
image: quantconnect/lean:foundation
options: --workdir /__w/Lean.DataSource.KavoutCompositeFactorBundle/Lean.DataSource.KavoutCompositeFactorBundle -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
9 changes: 2 additions & 7 deletions QuantConnect.DataSource.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<RootNamespace>QuantConnect.DataSource</RootNamespace>
<AssemblyName>QuantConnect.DataSource.KavoutCompositeFactorBundle</AssemblyName>
<OutputPath>bin\$(Configuration)</OutputPath>
<DocumentationFile>$(OutputPath)\QuantConnect.DataSource.KavoutCompositeFactorBundle.xml</DocumentationFile>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="protobuf-net" Version="3.1.33" />
<PackageReference Include="QuantConnect.Common" Version="2.5.*" />
</ItemGroup>

<ItemGroup>
Expand All @@ -17,9 +17,4 @@
<None Remove="tests\**" />
<None Remove=".gitignore" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Lean\Common\QuantConnect.csproj" />
</ItemGroup>

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

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

[Test]
public void ReaderTest()
{
Expand Down
9 changes: 6 additions & 3 deletions tests/Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<RootNamespace>QuantConnect.DataLibrary.Tests</RootNamespace>
</PropertyGroup>
<ItemGroup>
<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" />
Expand All @@ -14,4 +14,7 @@
<ItemGroup>
<ProjectReference Include="..\QuantConnect.DataSource.csproj" />
</ItemGroup>
<ItemGroup>
<Using Include="NUnit.Framework.Legacy.ClassicAssert" Alias="Assert" />
</ItemGroup>
</Project>

0 comments on commit ef404d5

Please sign in to comment.