forked from Rockachopa/Timmy-time-dashboard
ci: mobile-friendly test results via GitHub Actions
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
This commit is contained in:
34
.github/workflows/tests.yml
vendored
34
.github/workflows/tests.yml
vendored
@@ -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
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -25,6 +25,7 @@ env/
|
||||
.pytest_cache/
|
||||
.coverage
|
||||
htmlcov/
|
||||
reports/
|
||||
|
||||
# IDE
|
||||
.idea/
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
# Timmy Time — Mission Control
|
||||
|
||||
[](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.
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user