Run CI on self-hosted runners #59
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build & Test | |
| on: | |
| push: | |
| branches: ['*'] | |
| pull_request: | |
| branches: [master] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: self-hosted | |
| container: | |
| image: quantconnect/lean:foundation | |
| options: --cpus 12 --memory 12g | |
| env: | |
| QC_JOB_USER_ID: ${{ secrets.QC_JOB_USER_ID }} | |
| QC_API_ACCESS_TOKEN: ${{ secrets.QC_API_ACCESS_TOKEN }} | |
| QC_JOB_ORGANIZATION_ID: ${{ secrets.QC_JOB_ORGANIZATION_ID }} | |
| QC_COINAPI_API_KEY: ${{ secrets.QC_COINAPI_API_KEY }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v2 | |
| - name: Checkout Lean Same Branch | |
| id: lean-same-branch | |
| uses: actions/checkout@v2 | |
| continue-on-error: true | |
| with: | |
| ref: ${{ github.ref }} | |
| repository: QuantConnect/Lean | |
| path: Lean | |
| - name: Checkout Lean Master | |
| if: steps.lean-same-branch.outcome != 'success' | |
| uses: actions/checkout@v2 | |
| with: | |
| repository: QuantConnect/Lean | |
| path: Lean | |
| - name: Move Lean | |
| run: mv Lean ../Lean | |
| - name: Run build and tests | |
| run: | | |
| # Build QuantConnect.DataSource.CoinAPI | |
| dotnet build ./QuantConnect.CoinAPI/QuantConnect.DataSource.CoinAPI.csproj /p:Configuration=Release /v:quiet /p:WarningLevel=1 && \ | |
| # Build DataProcessing | |
| dotnet build ./DataProcessing/DataProcessing.csproj /p:Configuration=Release /v:quiet /p:WarningLevel=1 && \ | |
| # Build QuantConnect.DataSource.CoinAPI.Tests | |
| dotnet build ./QuantConnect.CoinAPI.Tests/QuantConnect.DataSource.CoinAPI.Tests.csproj /p:Configuration=Release /v:quiet /p:WarningLevel=1 && \ | |
| # Run QuantConnect.DataSource.CoinAPI.Tests | |
| dotnet test ./QuantConnect.CoinAPI.Tests/bin/Release/QuantConnect.Lean.DataSource.CoinAPI.Tests.dll | |