Skip to content
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
17 changes: 14 additions & 3 deletions .github/workflows/test-code-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,15 @@ name: Test code coverage
on:
push:
branches: ["main"]
pull_request:
pull_request_target:
branches: ["*"]
workflow_dispatch:

# Limit concurrent runs
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

permissions:
contents: read

Expand All @@ -18,9 +23,15 @@ jobs:
name: indicators
runs-on: ubuntu-latest

env:
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}

steps:
- name: Checkout source
- name: Checkout PR
uses: actions/checkout@v4
with:
# Explicitly checkout PR code
ref: ${{ github.event.pull_request.head.sha }}

- name: Setup .NET
uses: actions/setup-dotnet@v4
Expand All @@ -31,7 +42,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.12
python-version: 3.13
cache: "pip"

- name: Install dependencies
Expand Down
43 changes: 32 additions & 11 deletions .github/workflows/test-indicators.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,44 @@ jobs:

strategy:
matrix:
os: [windows-latest, ubuntu-24.04-arm, macos-latest]
python-version: ["3.8", "3.12"]
dotnet-version: ["6.x", "9.x"]
# ref: https://github.com/actions/runner-images#readme

include:

# oldest combinations
- os: macos-13
dotnet-version: "6.x"
python-version: "3.8"
- os: ubuntu-20.04
dotnet-version: "6.x"
python-version: "3.8"
- os: windows-2019
dotnet-version: "6.x"
python-version: "3.8"

# newest combinations
- os: macos-15
dotnet-version: "9.x"
python-version: "3.13"
post-summary: true
- os: ubuntu-24.04-arm
dotnet-version: "9.x"
python-version: "3.13"
post-summary: true
- os: windows-2025
dotnet-version: "9.x"
python-version: "3.13"
post-summary: true

runs-on: ${{ matrix.os }}
name: "Py${{ matrix.python-version }}/.NET${{ matrix.dotnet-version }} on ${{ matrix.os }}"

env:

# identify configurations that post test reports
POST_REPORT: ${{ matrix.python-version == '3.12' && matrix.dotnet-version == '9.x' }}

steps:
- name: Checkout source
uses: actions/checkout@v4

- name: Check debug settings
if: env.POST_REPORT == 'true'
if: ${{ matrix.post-summary }} == 'true'
shell: bash
run: |
echo "Checking for debug logging settings in package files..."
Expand All @@ -60,7 +80,7 @@ jobs:
cache: "pip"

- name: Verify DLL presence
if: matrix.os == 'macos-latest'
if: startsWith(matrix.os, 'macos')
run: |
ls -la stock_indicators/_cslib/lib/
if [ ! -f stock_indicators/_cslib/lib/Skender.Stock.Indicators.dll ]; then
Expand All @@ -77,9 +97,10 @@ jobs:

- name: Test indicators
run: pytest -vr A tests --junitxml=test-results.xml
continue-on-error: true

- name: Post test summary
uses: test-summary/action@v2
if: env.POST_REPORT == 'true' && always()
if: ${{ matrix.post-summary }} == 'true'
with:
paths: test-results.xml