Skip to content

chore: Update dev/test environment #2

chore: Update dev/test environment

chore: Update dev/test environment #2

# For more information see:
# https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Test code coverage
on:
push:
branches: ["main"]
pull_request:
branches: ["*"]
workflow_dispatch:
jobs:
test:
name: indicators
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x
dotnet-quality: "ga"
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.12
cache: "pip"
- name: Install dependencies
run: |
pip install -r requirements.txt
pip install -r requirements-test.txt
- name: Test indicators
run: |
coverage run -m --source=stock_indicators pytest
coverage xml
- name: Publish coverage to Codacy
uses: codacy/codacy-coverage-reporter-action@v1
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: coverage.xml