Skip to content

Make default cache-dependency-path paths fit most use cases #261

@ssbarnea

Description

@ssbarnea

The current default value for cache-dependency-glob is not flexible enough to be used by most people.

cache-dependency-glob: |
  **/requirements*.txt
  **/uv.lock

A more generic value like below should cover over 99.5% of use cases:

cache-dependency-glob: |
  **/*(requirements|constraints)*.(txt|in)
  **/pyproject.toml
  **/uv.lock

Reasoning:

  • There is no clear winner in battle between sort-friendly and english-syntax: test-requirements.txt vs requirements-test.txt, so supporting only one will affect ~50% users
  • constraints.txt is very popular against those using constraint files
  • lots of users are using .in instead of .txt extension because this is friendly with tools like dependabot, which can cause problems when mixing lock files with unlocked ones. .in is a way of saying that the file is clearly not a lock file.
  • pyproject.toml should not need any explanation
  • Not having a set of defaults that work for most users makes it harder to reuse the action, especially by other reusable actions/workflows, as users will need to find a way to pass customizations to the reused action. With a generic enough default, the need to it disappears.

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