mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-04 20:17:43 +00:00
Update file paths for QuanTAlib packages in main_automation.yml
This commit is contained in:
@@ -10,13 +10,21 @@ on:
|
||||
|
||||
jobs:
|
||||
build_test:
|
||||
runs-on: windows-latest
|
||||
#runs-on: windows-latest
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
############## Install tools
|
||||
|
||||
- name: Create Quantower folder at root
|
||||
run: |
|
||||
sudo mkdir -p /Quantower/
|
||||
sudo chmod -R 777 /Quantower
|
||||
|
||||
- name: Install .NET
|
||||
uses: actions/setup-dotnet@v3
|
||||
with:
|
||||
@@ -34,31 +42,14 @@ jobs:
|
||||
uses: gittools/actions/gitversion/execute@v0
|
||||
with:
|
||||
useConfigFile: true
|
||||
configFilePath: /a/QuanTAlib/QuanTAlib/GitVersion.yml
|
||||
#configFilePath: GitVersion.yml
|
||||
updateAssemblyInfo: true
|
||||
|
||||
- name: Display GitVersion variables (without prefix)
|
||||
run: |
|
||||
echo "Major: ${{ steps.gitversion.outputs.major }}"
|
||||
echo "Minor: ${{ steps.gitversion.outputs.minor }}"
|
||||
echo "Patch: ${{ steps.gitversion.outputs.patch }}"
|
||||
echo "PreReleaseTag: ${{ steps.gitversion.outputs.preReleaseTag }}"
|
||||
echo "PreReleaseTagWithDash: ${{ steps.gitversion.outputs.preReleaseTagWithDash }}"
|
||||
echo "PreReleaseLabel: ${{ steps.gitversion.outputs.preReleaseLabel }}"
|
||||
echo "PreReleaseNumber: ${{ steps.gitversion.outputs.preReleaseNumber }}"
|
||||
echo "WeightedPreReleaseNumber: ${{ steps.gitversion.outputs.weightedPreReleaseNumber }}"
|
||||
echo "FullBuildMetaData: ${{ steps.gitversion.outputs.fullBuildMetaData }}"
|
||||
echo "MajorMinorPatch: ${{ steps.gitversion.outputs.majorMinorPatch }}"
|
||||
echo "SemVer: ${{ steps.gitversion.outputs.semVer }}"
|
||||
echo "AssemblySemVer: ${{ steps.gitversion.outputs.assemblySemVer }}"
|
||||
echo "AssemblySemFileVer: ${{ steps.gitversion.outputs.assemblySemFileVer }}"
|
||||
echo "FullSemVer: ${{ steps.gitversion.outputs.fullSemVer }}"
|
||||
echo "InformationalVersion: ${{ steps.gitversion.outputs.informationalVersion }}"
|
||||
|
||||
- name: Install JDK11 for Sonar Scanner
|
||||
uses: actions/setup-java@v1
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: 1.11
|
||||
java-version: 11
|
||||
distribution: 'zulu'
|
||||
|
||||
- name: Install JetBrains
|
||||
run: dotnet tool install JetBrains.dotCover.GlobalTool --global
|
||||
@@ -74,42 +65,52 @@ jobs:
|
||||
run: dotnet sonarscanner begin /o:"mihakralj" /k:"mihakralj_QuanTAlib"
|
||||
/d:sonar.login="${{ secrets.SONAR_TOKEN }}"
|
||||
/d:sonar.host.url="https://sonarcloud.io"
|
||||
/d:sonar.cs.dotcover.reportsPaths=./coveragereport.html
|
||||
/d:sonar.cs.dotcover.reportsPaths=./dotcover.xml
|
||||
|
||||
############# Build and test
|
||||
|
||||
- name: Build Main branch of QuanTAlib DLL
|
||||
if: ${{ github.ref != 'refs/heads/dev' }}
|
||||
run: dotnet build ./Calculations/Calculations.csproj --verbosity detailed --configuration Release --nologo -p:PackageVersion=${{ steps.gitversion.outputs.MajorMinorPatch }}
|
||||
|
||||
run: dotnet build ./Calculations/Calculations.csproj --configuration Release --nologo -p:PackageVersion=${{ steps.gitversion.outputs.MajorMinorPatch }}
|
||||
- name: Build dev branch of QuanTAlib DLL
|
||||
if: ${{ github.ref == 'refs/heads/dev' }}
|
||||
run: dotnet build ./Calculations/Calculations.csproj --verbosity detailed --configuration Release --nologo -p:PackageVersion=${{ steps.gitversion.outputs.FullSemVer }}
|
||||
|
||||
run: dotnet build ./Calculations/Calculations.csproj --configuration Release --nologo -p:PackageVersion=${{ steps.gitversion.outputs.FullSemVer }}
|
||||
- name: Build Indicators DLL
|
||||
run: dotnet build ./Indicators/Indicators.csproj --verbosity detailed --configuration Release --nologo
|
||||
|
||||
run: dotnet build ./Indicators/Indicators.csproj --configuration Release --nologo
|
||||
- name: Build Strategies DLL
|
||||
run: dotnet build ./Strategies/Strategies.csproj --verbosity detailed --configuration Release --nologo
|
||||
run: dotnet build ./Strategies/Strategies.csproj --configuration Release --nologo
|
||||
|
||||
- name: DotCover Test XML
|
||||
run: dotnet dotcover test ./Tests/Tests.csproj --verbosity minimal --dcReportType=DetailedXML --dcoutput=./coveragereport.xml
|
||||
- name: DotCover Test
|
||||
run: dotnet dotcover test Tests/Tests.csproj --dcReportType=DetailedXML --dcReportType=HTML --dcoutput=dotcover.xml --dcoutput=dotcover.html
|
||||
- name: Coverlet Test
|
||||
run: dotnet test -p:CollectCoverage=true --collect:"XPlat Code Coverage" --results-directory "./"
|
||||
|
||||
- name: Upload coverage reports to Codecov
|
||||
############## Report to Sonar/CodeCov/Codacy
|
||||
|
||||
- name: Move coverage report to project root
|
||||
run: |
|
||||
report=$(find . -name '*coverage.cobertura.xml' | head -1)
|
||||
mv "$report" ./coverage.cobertura.xml
|
||||
|
||||
- name: Upload to Codacy
|
||||
uses: codacy/codacy-coverage-reporter-action@v1
|
||||
with:
|
||||
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
|
||||
coverage-reports: "*cover*.xml"
|
||||
|
||||
- name: Upload to Codecov
|
||||
uses: codecov/codecov-action@v3
|
||||
with:
|
||||
files: ./coveragereport.xml
|
||||
files: cover*
|
||||
verbose: true
|
||||
|
||||
- name: Sonar reporter
|
||||
- name: Upload to Sonar
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
run: dotnet sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}"
|
||||
|
||||
- name: Codacy coverage reporter
|
||||
uses: codacy/codacy-coverage-reporter-action@v1
|
||||
with:
|
||||
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
|
||||
coverage-reports: ./coveragereport.xml
|
||||
############## Publish dev release
|
||||
|
||||
- name: Publish dev release assets
|
||||
if: ${{ github.ref == 'refs/heads/dev' }}
|
||||
@@ -120,18 +121,20 @@ jobs:
|
||||
prerelease: true
|
||||
overwrite: true
|
||||
release_name: ${{ steps.gitversion.outputs.SemVer }}
|
||||
tag_name: ${{ steps.gitversion.outputs.SemVer }}
|
||||
tag_name: prerelease
|
||||
release_config: |
|
||||
.\Calculations\bin\Release\net6.0\QuanTAlib.dll
|
||||
.\Indicators\bin\Release\QuanTAlib_Indicators.dll
|
||||
.\Strategies\bin\Release\QuanTAlib_Strategies.dll
|
||||
Calculations/bin/Release/net6.0/QuanTAlib.dll
|
||||
Indicators/bin/Release/QuanTAlib_Indicators.dll
|
||||
Strategies/bin/Release/QuanTAlib_Strategies.dll
|
||||
|
||||
- name: Push package to myget.org
|
||||
run: dotnet nuget push '.\Calculations\bin\Release\QuanTAlib.*.nupkg'
|
||||
run: dotnet nuget push 'Calculations/bin/Release/QuanTAlib.*.nupkg'
|
||||
--api-key ${{ secrets.MYGET_DEPLOY_KEY_QUANTALIB }}
|
||||
--source https://www.myget.org/F/quantalib/api/v2/package
|
||||
--skip-duplicate
|
||||
|
||||
############## Publish main release
|
||||
|
||||
- name: Publish main release assets
|
||||
if: ${{ github.ref == 'refs/heads/main' }}
|
||||
uses: SourceSprint/upload-multiple-releases@1.0.7
|
||||
@@ -141,15 +144,15 @@ jobs:
|
||||
prerelease: false
|
||||
overwrite: true
|
||||
release_name: ${{ steps.gitversion.outputs.MajorMinorPatch }}
|
||||
tag_name: ${{ steps.gitversion.outputs.MajorMinorPatch }}
|
||||
tag_name: latest
|
||||
release_config: |
|
||||
.\Calculations\bin\Release\net6.0\QuanTAlib.dll
|
||||
.\Indicators\bin\Release\QuanTAlib_Indicators.dll
|
||||
.\Strategies\bin\Release\QuanTAlib_Strategies.dll
|
||||
Calculations/bin/Release/net6.0/QuanTAlib.dll
|
||||
Indicators/bin/Release/QuanTAlib_Indicators.dll
|
||||
Strategies/bin/Release/QuanTAlib_Strategies.dll
|
||||
|
||||
- name: Push package to nuget.org
|
||||
if: ${{ github.ref == 'refs/heads/main' }}
|
||||
run: dotnet nuget push '.\Calculations\bin\Release\QuanTAlib.*.nupkg'
|
||||
run: dotnet nuget push 'Calculations/bin/Release/QuanTAlib.*.nupkg'
|
||||
--api-key ${{ secrets.NUGET_DEPLOY_KEY_QUANTLIB }}
|
||||
--source https://api.nuget.org/v3/index.json
|
||||
--skip-duplicate
|
||||
|
||||
Reference in New Issue
Block a user