Skip to content

Add CI job that fails PRs if tests are taking >1s #663

@DominicOram

Description

@DominicOram

All unit tests should be fast running and so not take >1s each. If they are taking longer it is most likely due to an issue with poor mocking. To make sure we enforce this we should add a CI check on a PR that confirms that no tests individually took too long.

The durations can be found with pytest -m "not s03" --durations=0 but this isn't very machine readable so it may be worth a look around to see if we can get them out in a nicer way

We should use the approach discussed in bluesky/ophyd-async#729 (comment). Then feed it back into the copier template

Acceptance Criteria

  • CI blocks PRs where an individual test is taking longer than 1s

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions