diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d820be6..e2e3e70 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 \ No newline at end of file + 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 \ No newline at end of file diff --git a/QuantConnect.DataSource.csproj b/QuantConnect.DataSource.csproj index 60fa685..b359abe 100644 --- a/QuantConnect.DataSource.csproj +++ b/QuantConnect.DataSource.csproj @@ -1,14 +1,14 @@ - net6.0 + net9.0 QuantConnect.DataSource QuantConnect.DataSource.KavoutCompositeFactorBundle bin\$(Configuration) $(OutputPath)\QuantConnect.DataSource.KavoutCompositeFactorBundle.xml - + @@ -17,9 +17,4 @@ - - - - - diff --git a/tests/KavoutCompositeFactorBundleTests.cs b/tests/KavoutCompositeFactorBundleTests.cs index a326b9e..06589c1 100644 --- a/tests/KavoutCompositeFactorBundleTests.cs +++ b/tests/KavoutCompositeFactorBundleTests.cs @@ -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(Configuration.Config.Get("map-file-provider", typeof(LocalDiskMapFileProvider).Name)); + } + [Test] public void ReaderTest() { diff --git a/tests/Tests.csproj b/tests/Tests.csproj index 6c54751..05cc032 100644 --- a/tests/Tests.csproj +++ b/tests/Tests.csproj @@ -1,11 +1,11 @@ - net6.0 + net9.0 QuantConnect.DataLibrary.Tests - - + + all @@ -14,4 +14,7 @@ + + +