Skip to content

Do not run workflows if only non-source-code files are changed #837

Closed

Description

@seisman

Description of the desired feature

Sometimes, we make changes to plain text files (.md, .rst), without changing any source codes. We know that the changes won't break our tests, but the workflow still runs 9 jobs (Ubuntu/macOS/Windows + Python 3.7/3.8/3.9). It's a waste of CI resources. For example, #726, #802, and #836.

GitHub Actions actually can skip workflows based on the files that are changed,

When using the push and pull_request events, you can configure a workflow to run when at least one file does not match paths-ignore or at least one modified file matches the configured paths. Path filters are not evaluated for pushes to tags.

see https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#onpushpull_requestpaths for details.

We may explore this to reduce our CI usages. IMHO, we can skip running workflows if only the following files are changes:

  • *.md
  • **/*.rst
  • doc/**
  • examples/** (?)

Note that, the documentation is still built by vercel, so documentation preview still works.

Are you willing to help implement and maintain this feature? Yes, but let's discuss it first and contributions are welcomed.

Activity

  1. added
    enhancement
    maintenance
    on Feb 5, 2021
  2. liamtoney commented on Feb 5, 2021

    @liamtoney
    Member

    I think this makes a lot of sense.

  3. added a commit that references this issue on Feb 6, 2021
    63081b9
  4. added a commit that references this issue on Dec 21, 2022
    a6324b9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementmaintenance

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions