Implements the package from PLAN.md: config/data loading, the LP-first MILP-fallback rolling-horizon optimiser, battery degradation tracking, independent schedule validation, metrics, plots and the CLI, plus the matching test suite. Adds a Gitea Actions workflow (lint + tests) that posts a pass/fail notification to ntfy on every run, and a .gitignore for build/cache artefacts that had been tracked by mistake. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 45
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install uv
|
||||
run: |
|
||||
curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
|
||||
|
||||
- name: Install dependencies
|
||||
run: uv sync
|
||||
|
||||
- name: Lint
|
||||
run: uv run ruff check .
|
||||
|
||||
- name: Test
|
||||
run: uv run pytest -q
|
||||
|
||||
- name: Notify ntfy
|
||||
if: always()
|
||||
env:
|
||||
NTFY_USER: ${{ secrets.NTFY_USER }}
|
||||
NTFY_PASS: ${{ secrets.NTFY_PASS }}
|
||||
run: |
|
||||
if [ "${{ job.status }}" = "success" ]; then
|
||||
title="CI passed: ${{ gitea.repository }}"
|
||||
tags="white_check_mark"
|
||||
else
|
||||
title="CI failed: ${{ gitea.repository }}"
|
||||
tags="x"
|
||||
fi
|
||||
curl -s -u "$NTFY_USER:$NTFY_PASS" \
|
||||
-H "Title: $title" \
|
||||
-H "Tags: $tags" \
|
||||
-H "Click: ${{ gitea.server_url }}/${{ gitea.repository }}/actions/runs/${{ gitea.run_id }}" \
|
||||
-d "Branch ${{ gitea.ref_name }} @ ${{ gitea.sha }} (${{ job.status }})" \
|
||||
"https://notify.daubney.dev/aurora_task"
|
||||
Reference in New Issue
Block a user