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
Show file tree
Hide file tree
Changes from all commits
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
19 changes: 18 additions & 1 deletion .github/workflows/_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -59,3 +60,19 @@ jobs:
files: cov.xml
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

- name: Comment on PR test status
run: npx github-actions-ctrf summary report.json --pr-comment
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
Expand Up @@ -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",
Expand Down
Loading