Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactored Quantower classes #42

Merged
merged 2 commits into from
Oct 13, 2024
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
Binary file modified .github/TradingPlatform.BusinessLayer.dll
Binary file not shown.
27 changes: 1 addition & 26 deletions .github/TradingPlatform.BusinessLayer.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

77 changes: 42 additions & 35 deletions .github/workflows/Publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,23 +43,36 @@ jobs:

- name: SonarCloud Scanner Start
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
if [[ ${{ github.event_name }} == 'pull_request' ]]; then
PR_PARAMS="/d:sonar.pullrequest.key=${{ github.event.pull_request.number }} \
/d:sonar.pullrequest.branch=${{ github.head_ref }} \
/d:sonar.pullrequest.base=${{ github.base_ref }}"
elif [[ ${{ github.event_name }} == 'push' ]]; then
BRANCH_PARAMS="/d:sonar.branch.name=${{ github.ref_name }}"
else
BRANCH_PARAMS="/d:sonar.branch.name=${{ github.ref_name }}"
fi

dotnet sonarscanner begin \
/k:"mihakralj_QuanTAlib" \
/o:"mihakralj" \
/d:sonar.token="${{ secrets.SONAR_TOKEN }}" \
/d:sonar.host.url="https://sonarcloud.io" \
/d:sonar.cs.dotcover.reportsPaths=dotcover* \
/d:sonar.scanner.scanAll=false
/d:sonar.scanner.scanAll=false \
/d:sonar.scm.provider=git \
$PR_PARAMS $BRANCH_PARAMS

- name: Build
run: |
dotnet build --no-restore --configuration Debug
dotnet build ./lib/quantalib.csproj --configuration Release --nologo
dotnet build ./quantower/Averages/Averages.csproj --configuration Release --nologo
dotnet build ./quantower/Statistics/Statistics.csproj --configuration Release --nologo
dotnet build ./quantower/Volatility/Volatility.csproj --configuration Release --nologo
dotnet build ./quantower/Averages/_Averages.csproj --configuration Release --nologo
dotnet build ./quantower/Statistics/_Statistics.csproj --configuration Release --nologo
dotnet build ./quantower/Volatility/_Volatility.csproj --configuration Release --nologo
dotnet build ./SyntheticVendor/SyntheticVendor.csproj --configuration Release --nologo
dotnet dotcover test Tests/Tests.csproj --dcReportType=HTML --dcoutput=./dotcover.html

Expand Down Expand Up @@ -94,9 +107,9 @@ jobs:
run: |
dotnet build --no-restore --configuration Debug
dotnet build ./lib/quantalib.csproj --configuration Release --nologo
dotnet build ./quantower/Averages/Averages.csproj --configuration Release --nologo
dotnet build ./quantower/Statistics/Statistics.csproj --configuration Release --nologo
dotnet build ./quantower/Volatility/Volatility.csproj --configuration Release --nologo
dotnet build ./quantower/Averages/_Averages.csproj --configuration Release --nologo
dotnet build ./quantower/Statistics/_Statistics.csproj --configuration Release --nologo
dotnet build ./quantower/Volatility/_Volatility.csproj --configuration Release --nologo
dotnet build ./SyntheticVendor/SyntheticVendor.csproj --configuration Release --nologo

- name: Run Tests with Coverage
Expand Down Expand Up @@ -216,7 +229,10 @@ jobs:

build_publish:
needs: [SonarCloud, Code_Coverage, CodeQL, Codacy_Scan, SecurityCodeScan]
if: success()
if: |
success() &&
(github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev')) ||
github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand Down Expand Up @@ -246,31 +262,25 @@ jobs:
run: |
dotnet build ./lib/quantalib.csproj --configuration Release --nologo \
-p:PackageVersion=${{ steps.gitversion.outputs.MajorMinorPatch }}
dotnet build ./quantower/Averages/Averages.csproj --configuration Release --nologo
dotnet build ./quantower/Statistics/Statistics.csproj --configuration Release --nologo
dotnet build ./quantower/Volatility/Volatility.csproj --configuration Release --nologo
dotnet build ./quantower/Averages/_Averages.csproj --configuration Release --nologo
dotnet build ./quantower/Statistics/_Statistics.csproj --configuration Release --nologo
dotnet build ./quantower/Volatility/_Volatility.csproj --configuration Release --nologo
dotnet build ./SyntheticVendor/SyntheticVendor.csproj --configuration Release --nologo

############# Publish dev release

- name: Update Development Release
- name: Create or Update Development Release
if: github.ref == 'refs/heads/dev'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MYGET_URL: https://www.myget.org/feed/quantalib/package/nuget/QuanTAlib
PACKAGE_VERSION: ${{ steps.gitversion.outputs.NuGetVersion }}
run: |
tag_name="development"
release_name="Development Build"
gh release delete $tag_name --yes || true
git push origin :refs/tags/$tag_name || true
gh release create $tag_name \
--title "$release_name" \
--notes "Latest development build from commit ${{ github.sha }}

MyGet Package: [$MYGET_URL/$PACKAGE_VERSION]($MYGET_URL/$PACKAGE_VERSION) \n" \
gh release delete development --yes || true
gh release create development \
--title "Development Build" \
--notes "Latest development build from commit ${{ github.sha }}" \
--prerelease \
--target ${{ github.sha }} \
lib/bin/Release/QuanTAlib.dll \
quantower/Averages/bin/Release/Averages.dll \
quantower/Statistics/bin/Release/Statistics.dll \
quantower/Volatility/bin/Release/Volatility.dll \
Expand All @@ -286,20 +296,17 @@ jobs:

############## Publish main release

- name: Publish release assets
- name: Create GitHub Release
if: ${{ github.ref == 'refs/heads/main' }}
uses: SourceSprint/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
prerelease: false
overwrite: true
release_name: ${{ steps.gitversion.outputs.MajorMinorPatch }}
tag_name: latest
release_config: |
quantower/Averages/bin/Release/Averages.dll
quantower/Statistics/bin/Release/Statistics.dll
quantower/Volatility/bin/Release/Volatility.dll
run: |
gh release create v${{ steps.gitversion.outputs.MajorMinorPatch }} \
--title "Release ${{ steps.gitversion.outputs.MajorMinorPatch }}" \
--notes "Release notes for version ${{ steps.gitversion.outputs.MajorMinorPatch }}" \
quantower/Averages/bin/Release/Averages.dll \
quantower/Statistics/bin/Release/Statistics.dll \
quantower/Volatility/bin/Release/Volatility.dll \
SyntheticVendor/bin/Release/SyntheticVendor.dll

- name: Push release package to nuget.org
Expand All @@ -308,4 +315,4 @@ jobs:
dotnet nuget push 'lib/bin/Release/QuanTAlib.*.nupkg' \
--source https://api.nuget.org/v3/index.json \
--skip-duplicate \
--api-key ${{ secrets.NUGET_DEPLOY_KEY_QUANTLIB }}
--api-key ${{ secrets.NUGET_DEPLOY_KEY_QUANTLIB }}
165 changes: 0 additions & 165 deletions .github/workflows/main_automation.yml

This file was deleted.

Loading
Loading