Skip to content

fix(voltage): single percentage-band formula + voltage_sensitivity preset (issue #4) #183

fix(voltage): single percentage-band formula + voltage_sensitivity preset (issue #4)

fix(voltage): single percentage-band formula + voltage_sensitivity preset (issue #4) #183

Workflow file for this run

name: Validate
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
# All third-party action invocations are SHA-pinned (with the
# corresponding tag in a comment) so a moved tag in the upstream
# action repo cannot silently change what runs in CI. Refresh
# periodically by re-running
# `gh api repos/<owner>/<repo>/git/refs/tags/<tag>` (or, for branch-
# tracked actions like pypa/gh-action-pypi-publish@release/v1,
# `gh api repos/<owner>/<repo>/branches/<branch>`) and updating both
# the SHA and the comment in lockstep across every workflow.
jobs:
validate:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14', '3.15-dev']
continue-on-error: ${{ matrix.python-version == '3.15-dev' }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[notifications]"
pip install pytest pytest-cov pytest-mock
- name: Run tests
run: |
pytest --cov=src/eneru --cov-report=xml --cov-report=term -v
- name: Upload coverage to Codecov
if: matrix.python-version == '3.11'
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6
with:
files: ./coverage.xml
fail_ci_if_error: false
verbose: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Validate example configs
run: |
for config in examples/*.yaml; do
echo "Validating $config..."
python -m eneru validate --config "$config"
done