Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide historical summary of tests and PR comment on failed tests #567

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Provide historical summary of tests and PR comment on failed tests
DiamondJoseph committed Oct 14, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 54d879594c0dc28ab75f16c4a326b50de5543629
19 changes: 18 additions & 1 deletion .github/workflows/_test.yml
Original file line number Diff line number Diff line change
@@ -49,8 +49,9 @@ jobs:
with:
python-version: ${{ inputs.python-version }}
pip-install: ".[dev]"

- name: Run tests
run: tox -e tests
run: tox -e tests -- --ctrf report.json

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
@@ -59,3 +60,19 @@ jobs:
files: cov.xml
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

- name: Comment on failing PR tests
run: npx github-actions-ctrf summary report.json --pr-comment --on-fail-only
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Publish CTRF Historical results table
run: npx github-actions-ctrf historical report.json
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload test results
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.python-version }}-${{ inputs.runs-on }}-ctrf-report
path: report.json
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -64,6 +64,7 @@ dev = [
"pytest-forked",
"pytest-rerunfailures",
"pytest-timeout",
"pytest-json-ctrf",
"ruff",
"sphinx<7.4.0", # https://github.com/bluesky/ophyd-async/issues/459
"sphinx-autobuild",