From 782953695207ba11daa222432d2acbce7654e1f1 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 19 Feb 2026 19:41:01 +0000 Subject: [PATCH] ci: mobile-friendly test results via GitHub Actions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Workflow upgrades: - permissions: checks: write + pull-requests: write (required for annotations) - pytest now outputs --junitxml=reports/junit.xml and --cov-report=xml - EnricoMi/publish-unit-test-result-action@v2: posts a "pytest results" check annotation AND a PR comment showing pass/fail counts with per-test breakdown — both visible in the GitHub mobile app - actions/upload-artifact@v4: uploads coverage.xml (14-day retention) browsable from the Actions tab on mobile README: - Live test badge at the top (green/red, links to Actions run history) .gitignore: - Add reports/ so generated junit.xml + coverage.xml are never committed https://claude.ai/code/session_01M4L3R98N5fgXFZRvV8X9b6 --- .github/workflows/tests.yml | 34 +++++++++++++++++++++++++++++++++- .gitignore | 1 + README.md | 2 ++ 3 files changed, 36 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 02fd1748..094447fb 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -10,6 +10,12 @@ jobs: test: runs-on: ubuntu-latest + # Required for publish-unit-test-result-action to post check runs and PR comments + permissions: + contents: read + checks: write + pull-requests: write + steps: - uses: actions/checkout@v4 @@ -22,4 +28,30 @@ jobs: run: pip install -e ".[dev]" - name: Run tests - run: pytest --cov=src --cov-report=term-missing + run: | + pytest \ + --tb=short \ + --cov=src \ + --cov-report=term-missing \ + --cov-report=xml:reports/coverage.xml \ + --junitxml=reports/junit.xml + + # Posts a check annotation + PR comment showing pass/fail counts. + # Visible in the GitHub mobile app under Checks and in PR conversations. + - name: Publish test results + uses: EnricoMi/publish-unit-test-result-action@v2 + if: always() + with: + files: reports/junit.xml + check_name: "pytest results" + comment_title: "Test Results" + report_individual_runs: true + + # Coverage report available as a downloadable artifact in the Actions tab + - name: Upload coverage report + uses: actions/upload-artifact@v4 + if: always() + with: + name: coverage-report + path: reports/coverage.xml + retention-days: 14 diff --git a/.gitignore b/.gitignore index 7415281b..ff2474cb 100644 --- a/.gitignore +++ b/.gitignore @@ -25,6 +25,7 @@ env/ .pytest_cache/ .coverage htmlcov/ +reports/ # IDE .idea/ diff --git a/README.md b/README.md index fe356be0..ce078a71 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Timmy Time — Mission Control +[![Tests](https://github.com/Alexspayne/Timmy-time-dashboard/actions/workflows/tests.yml/badge.svg)](https://github.com/Alexspayne/Timmy-time-dashboard/actions/workflows/tests.yml) + A local-first dashboard for your sovereign AI agents. Talk to Timmy, watch his status, verify Ollama is running — all from a browser, no cloud required. ---