Skip to content

Commit

Permalink
dotnet 9 (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin-Molinero authored Dec 19, 2024
1 parent e230740 commit da8ddb3
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 21 deletions.
28 changes: 17 additions & 11 deletions .github/workflows/gh-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
env:
QC_ALPACA_API_KEY: ${{ secrets.QC_ALPACA_API_KEY }}
QC_ALPACA_API_SECRET: ${{ secrets.QC_ALPACA_API_SECRET }}
Expand All @@ -18,13 +18,14 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Free space
run: df -h && sudo rm -rf /usr/local/lib/android && sudo rm -rf /opt/ghc && rm -rf /opt/hostedtoolcache* && df -h

- uses: addnab/docker-run-action@v3
- name: Liberate disk space
uses: jlumbroso/free-disk-space@main
with:
image: quantconnect/lean:foundation
options: --workdir /__w/Lean.Brokerages.Alpaca/Lean.Brokerages.Alpaca -v /home/runner/work:/__w -e QC_ALPACA_API_KEY=${{ secrets.QC_ALPACA_API_KEY }} -e QC_ALPACA_API_SECRET=${{ secrets.QC_ALPACA_API_SECRET }} -e QC_ALPACA_ACCESS_TOKEN=${{ secrets.QC_ALPACA_ACCESS_TOKEN }} -e QC_ALPACA_PAPER_TRADING=${{ secrets.QC_ALPACA_PAPER_TRADING }} -e QC_JOB_USER_ID=${{ secrets.QC_JOB_USER_ID }} -e QC_API_ACCESS_TOKEN=${{ secrets.QC_API_ACCESS_TOKEN }} -e QC_JOB_ORGANIZATION_ID=${{ secrets.QC_JOB_ORGANIZATION_ID }}
tool-cache: true
large-packages: false
docker-images: false
swap-storage: false

- name: Checkout Lean Same Branch
id: lean-same-branch
Expand All @@ -45,8 +46,13 @@ jobs:
- name: Move Lean
run: mv Lean ../Lean

- name: Build
run: dotnet build /p:Configuration=Release /v:quiet /p:WarningLevel=1 QuantConnect.AlpacaBrokerage.sln

- name: Run Tests
run: dotnet test ./QuantConnect.AlpacaBrokerage.Tests/bin/Release/QuantConnect.Brokerages.Alpaca.Tests.dll
- uses: addnab/docker-run-action@v3
with:
image: quantconnect/lean:foundation
options: --workdir /__w/Lean.Brokerages.Alpaca/Lean.Brokerages.Alpaca -v /home/runner/work:/__w -e QC_ALPACA_API_KEY=${{ secrets.QC_ALPACA_API_KEY }} -e QC_ALPACA_API_SECRET=${{ secrets.QC_ALPACA_API_SECRET }} -e QC_ALPACA_ACCESS_TOKEN=${{ secrets.QC_ALPACA_ACCESS_TOKEN }} -e QC_ALPACA_PAPER_TRADING=${{ secrets.QC_ALPACA_PAPER_TRADING }} -e QC_JOB_USER_ID=${{ secrets.QC_JOB_USER_ID }} -e QC_API_ACCESS_TOKEN=${{ secrets.QC_API_ACCESS_TOKEN }} -e QC_JOB_ORGANIZATION_ID=${{ secrets.QC_JOB_ORGANIZATION_ID }}
shell: bash
run: |
# Build
dotnet build /p:Configuration=Release /v:quiet /p:WarningLevel=1 QuantConnect.AlpacaBrokerage.sln && \
# Run Tests
dotnet test ./QuantConnect.AlpacaBrokerage.Tests/bin/Release/QuantConnect.Brokerages.Alpaca.Tests.dll
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<NoWarn>$(NoWarn);NU1605</NoWarn>
<NoWarn>$(NoWarn);NU1605</NoWarn>
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>

<IsPackable>false</IsPackable>
<Copyright>Copyright © 2024</Copyright>
Expand All @@ -19,14 +19,16 @@

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
<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>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.4" />
</ItemGroup>

<ItemGroup>
<Using Include="NUnit.Framework.Legacy.ClassicAssert" Alias="Assert" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Lean\Tests\QuantConnect.Tests.csproj" />
<ProjectReference Include="..\QuantConnect.AlpacaBrokerage\QuantConnect.AlpacaBrokerage.csproj" />
Expand All @@ -37,8 +39,8 @@
<Content Include="config.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Reference Include="Alpaca.Markets">
<HintPath>..\QuantConnect.AlpacaBrokerage\Alpaca.Markets.dll</HintPath>
</Reference>
</ItemGroup>
<Reference Include="Alpaca.Markets">
<HintPath>..\QuantConnect.AlpacaBrokerage\Alpaca.Markets.dll</HintPath>
</Reference>
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<NoWarn>$(NoWarn);NU1605</NoWarn>
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<Product>QuantConnect.Brokerages.Alpaca</Product>
<AssemblyName>QuantConnect.Brokerages.Alpaca</AssemblyName>
<RootNamespace>QuantConnect.Brokerages.Alpaca</RootNamespace>
Expand Down

0 comments on commit da8ddb3

Please sign in to comment.