Skip to content

Seeking examples of pytest-testmon in GitHub Actions #226

@xianyuanliu

Description

@xianyuanliu

Is your feature request related to a problem? Please describe.

I'm looking to use pytest-testmon to optimize test execution time in the GitHub Action. I use the GitHub Action Cache to manage .testmondata storage and restoration. Here's my design approach:

  1. The main branch undergoes scheduled tests to generate a new .testmondata.
  2. Branches within PRs simply restore the generated .testmondata for a faster test, without updating it.

However, an issue arises when I execute pytest --testmon-nocollect within the PR: a new .testmondata is unexpectedly generated in the GitHub Action Cache. I'm unsure about the root cause of this. Could you possibly share any examples or repositories that have encountered and addressed a similar scenario?

Describe the solution you'd like
When I run pytest --testmon-nocollect within the PR, no new .testmondata is generated in the GitHub Action Cache. However, executing pytest --testmon does result in the creation of a new .testmondata in the cache.

Describe alternatives you've considered
Not yet.

Additional context
Nope.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions