Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 18 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +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: Liberate disk space
uses: jlumbroso/free-disk-space@main
with:
tool-cache: true
large-packages: false
docker-images: false
swap-storage: false

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

- 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
options: --workdir /__w/Lean.DataSource.QuiverQuantWikipedia/Lean.DataSource.QuiverQuantWikipedia -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
4 changes: 2 additions & 2 deletions DataProcessing/DataProcessing.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<AssemblyName>process</AssemblyName>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
</PropertyGroup>
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.QuiverQuantWikipedia</AssemblyName>
<OutputPath>bin\$(Configuration)</OutputPath>
Expand Down
9 changes: 9 additions & 0 deletions tests/JsonConversionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,23 @@
using System;
using Newtonsoft.Json;
using NUnit.Framework;
using QuantConnect.Data.Auxiliary;
using QuantConnect.DataProcessing;
using QuantConnect.DataSource;
using QuantConnect.Interfaces;
using QuantConnect.Util;

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

private readonly JsonSerializerSettings _jsonSerializerSettings = new JsonSerializerSettings
{
DateTimeZoneHandling = DateTimeZoneHandling.Utc
Expand Down
9 changes: 9 additions & 0 deletions tests/QuiverWikipediaTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,22 @@
using Newtonsoft.Json;
using NUnit.Framework;
using QuantConnect.Data;
using QuantConnect.Data.Auxiliary;
using QuantConnect.DataSource;
using QuantConnect.Interfaces;
using QuantConnect.Util;

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

[Test]
public void QuiverWikipediaReader()
{
Expand Down
7 changes: 7 additions & 0 deletions tests/QuiverWikipediaUniverseTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,19 @@
using QuantConnect.Interfaces;
using QuantConnect.Util;
using QuantConnect.Lean.Engine.DataFeeds;
using QuantConnect.Data.Auxiliary;

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

[Test]
public void JsonRoundTrip()
{
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>
</PropertyGroup>
<ItemGroup>
Expand All @@ -10,14 +10,17 @@
<None Include="..\QuiverWikipediaUniverseSelectionAlgorithm.py" Link="QuiverWikipediaUniverseSelectionAlgorithm.py" />
</ItemGroup>
<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" />
<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