Skip to content

feat: Add Volume Profile indicator (update) #3755

feat: Add Volume Profile indicator (update)

feat: Add Volume Profile indicator (update) #3755

Workflow file for this run

name: Test Indicators
# These primary CI workflow is sequenced to use
# a fail-fast approach in multiple stages.
on:
push:
branches:
- "main"
- "v[0-9]*"
pull_request:
branches: ["*"]
workflow_dispatch:
permissions:
contents: read # Required for checkout
checks: write # Required for test results
jobs:
quick-check:
name: quick check
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v5
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: "10.x"
dotnet-quality: "ga"
cache: true
cache-dependency-path: "**/packages.lock.json"
- name: Build (package sources)
run: >
dotnet build src/Indicators.csproj
--configuration Release
--property:ContinuousIntegrationBuild=true
-warnAsError
- name: Lint .NET (core package only)
run: >
dotnet format src/Indicators.csproj
--verify-no-changes
--severity info
--no-restore
- name: Lint markdown
run: echo y | npx markdownlint-cli2
- name: Build (package tests)
run: >
dotnet build tests/indicators/Tests.Indicators.csproj
--configuration Release
--property:ContinuousIntegrationBuild=true
-warnAsError
lint-full:
name: linting (full)
runs-on: ubuntu-latest
needs: ["test-unit"]
steps:
- name: Checkout source
uses: actions/checkout@v5
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: "10.x"
dotnet-quality: "ga"
cache: true
cache-dependency-path: "**/packages.lock.json"
- name: Install Roslynator
run: dotnet tool install --global roslynator.dotnet.cli
- name: Build solution
# note: Roslynator cannot use cached bin/obj
run: >
dotnet build
--configuration Release
--property:ContinuousIntegrationBuild=true
- name: Run Roslynator analysis
run: >
roslynator analyze
--properties TargetFramework=net10.0
--severity-level info
--verbosity normal
||
echo "::warning title=Roslynator::analysis failed"
continue-on-error: true
- name: Check .NET code formatting
run: dotnet format --verify-no-changes --severity info --no-restore
test-unit:
name: unit tests
runs-on: ubuntu-latest
needs: quick-check
steps:
- name: Checkout source
uses: actions/checkout@v5
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: "10.x"
dotnet-quality: "ga"
cache: true
cache-dependency-path: "**/packages.lock.json"
- name: Test indicators
run: >
dotnet test tests/indicators/Tests.Indicators.csproj
--configuration Release
--settings tests/tests.unit.runsettings
--results-directory ./test-results/unit
--verbosity normal
--logger trx
--collect:"XPlat Code Coverage"
- name: Post unit test results
uses: dorny/[email protected]
if: always()
with:
name: Unit test results
path: test-results/unit/**/*.trx
reporter: dotnet-trx
list-tests: failed
continue-on-error: true
- name: Upload coverage reports
uses: actions/upload-artifact@v4
if: always()
with:
name: coverage-unit
path: test-results/unit/**/coverage.cobertura.xml
retention-days: 1
continue-on-error: true
- name: Publish coverage to Codacy
uses: codacy/[email protected]
if: success() && github.actor != 'dependabot[bot]'
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: test-results/unit/**/coverage.cobertura.xml
continue-on-error: true