diff --git a/.github/workflows/gh-actions.yml b/.github/workflows/gh-actions.yml index 55e249f..49ca370 100644 --- a/.github/workflows/gh-actions.yml +++ b/.github/workflows/gh-actions.yml @@ -6,20 +6,18 @@ on: jobs: build: - runs-on: ubuntu-20.04 - env: - QC_TEMPLATE_BROKERAGE_KEY: ${{ secrets.QC_TEMPLATE_BROKERAGE_KEY }} - QC_TEMPLATE_BROKERAGE_SECRET: ${{ secrets.QC_TEMPLATE_BROKERAGE_SECRET }} + runs-on: ubuntu-24.04 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.Template/Lean.Brokerages.Template -v /home/runner/work:/__w -e QC_TEMPLATE_BROKERAGE_KEY=${{ secrets.QC_TEMPLATE_BROKERAGE_KEY }} -e QC_TEMPLATE_BROKERAGE_SECRET=${{ secrets.QC_TEMPLATE_BROKERAGE_SECRET }} -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 @@ -40,8 +38,13 @@ jobs: - name: Move Lean run: mv Lean ../Lean - - name: Build - run: dotnet build /p:Configuration=Release /v:quiet /p:WarningLevel=1 QuantConnect.TemplateBrokerage.sln - - - name: Run Tests - run: dotnet test ./QuantConnect.TemplateBrokerage.Tests/bin/Release/QuantConnect.Brokerages.Template.Tests.dll + - uses: addnab/docker-run-action@v3 + with: + image: quantconnect/lean:foundation + options: --workdir /__w/Lean.Brokerages.Template/Lean.Brokerages.Template -v /home/runner/work:/__w -e QC_TEMPLATE_BROKERAGE_KEY=${{ secrets.QC_TEMPLATE_BROKERAGE_KEY }} -e QC_TEMPLATE_BROKERAGE_SECRET=${{ secrets.QC_TEMPLATE_BROKERAGE_SECRET }} -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.TemplateBrokerage.sln && \ + # Run Tests + dotnet test ./QuantConnect.TemplateBrokerage.Tests/bin/Release/QuantConnect.Brokerages.Template.Tests.dll diff --git a/QuantConnect.TemplateBrokerage.Tests/QuantConnect.TemplateBrokerage.Tests.csproj b/QuantConnect.TemplateBrokerage.Tests/QuantConnect.TemplateBrokerage.Tests.csproj index e5e77ac..2e2b599 100644 --- a/QuantConnect.TemplateBrokerage.Tests/QuantConnect.TemplateBrokerage.Tests.csproj +++ b/QuantConnect.TemplateBrokerage.Tests/QuantConnect.TemplateBrokerage.Tests.csproj @@ -3,7 +3,7 @@ Release AnyCPU - net6.0 + net9.0 false Copyright © 2021 @@ -18,14 +18,16 @@ - - + + all - runtime; build; native; contentfiles; analyzers; buildtransitive + + + diff --git a/QuantConnect.TemplateBrokerage.ToolBox/QuantConnect.TemplateBrokerage.ToolBox.csproj b/QuantConnect.TemplateBrokerage.ToolBox/QuantConnect.TemplateBrokerage.ToolBox.csproj index 0aaf69a..80f1573 100644 --- a/QuantConnect.TemplateBrokerage.ToolBox/QuantConnect.TemplateBrokerage.ToolBox.csproj +++ b/QuantConnect.TemplateBrokerage.ToolBox/QuantConnect.TemplateBrokerage.ToolBox.csproj @@ -4,7 +4,7 @@ Release AnyCPU Exe - net6.0 + net9.0 Copyright © 2021 bin\$(Configuration)\ QuantConnect.Brokerages.Template.ToolBox diff --git a/QuantConnect.TemplateBrokerage/QuantConnect.TemplateBrokerage.csproj b/QuantConnect.TemplateBrokerage/QuantConnect.TemplateBrokerage.csproj index 8980ff5..31659f1 100644 --- a/QuantConnect.TemplateBrokerage/QuantConnect.TemplateBrokerage.csproj +++ b/QuantConnect.TemplateBrokerage/QuantConnect.TemplateBrokerage.csproj @@ -2,7 +2,7 @@ Release AnyCPU - net6.0 + net9.0 QuantConnect.Brokerages.Template QuantConnect.Brokerages.Template QuantConnect.Brokerages.Template