Skip to content

ci: only run tests for non-docs changes#9194

Merged
janl merged 3 commits intoapache:masterfrom
neighbourhoodie:gh-workflow-ignore-for-doc-changes
Mar 26, 2026
Merged

ci: only run tests for non-docs changes#9194
janl merged 3 commits intoapache:masterfrom
neighbourhoodie:gh-workflow-ignore-for-doc-changes

Conversation

@Realtin
Copy link
Contributor

@Realtin Realtin commented Mar 9, 2026

Overview

This PR changes the ci workflow file in a way that it only runs if there are changes in paths that as not considered doc changes:

      - '.github/actions/**'
      - '.github/workflows/docs.yml'
      - 'package.json'
      - 'bin/**'
      - 'docs/**'

This only mirrors the path list that was already defined in the docs.yml. But could be extended with for example the CONTRIBUTING.md, TESTING.md and README.md.

here is the documentation regarding the paths-ignore option in Github Workflows:
https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#example-excluding-paths

When all the path names match patterns in paths-ignore, the workflow will not run. If any path names do not match patterns in paths-ignore, even if some path names match the patterns, the workflow will run.

UPDATE:

I did update the paths for doc changes and the paths to ignore for tests to the suggested ones:

    - '.github/ISSUE_TEMPLATE/'
    - '.github/PULL_REQUEST_TEMPLATE.md'
    - 'CONTRIBUTING.md'
    - 'DISCLAIMER'
    - 'LICENSE'
    - 'NOTICE'
    - 'README.md'
    - 'TESTING.md'
    - 'docs/**'

Checklist

  • I am not a bot
  • This is my own work, I did not use AI, LLM's or similar technology for code or docs generation
  • Code is written and works correctly
  • Changes are covered by tests
  • Documentation changes were made in the docs folder

@Realtin Realtin closed this Mar 9, 2026
@Realtin Realtin reopened this Mar 9, 2026
@Realtin Realtin force-pushed the gh-workflow-ignore-for-doc-changes branch from c44902a to d08aae8 Compare March 9, 2026 13:37
@SourceR85
Copy link
Contributor

I would reject this, as it opens a trap for a fatal error:
If we change something in bin or workflows, or update a dependency, we wouldn't notice any resulting errors until the next code commit.

The idea itself is good, but only valid for the following paths:

  • docs/
  • .github/ISSUE_TEMPLATE/
  • .github/PULL_REQUEST_TEMPLATE.md
  • CONTRIBUTING.md
  • DISCLAIMER
  • LICENSE
  • NOTICE
  • README.md
  • TESTING.md

@janl
Copy link
Member

janl commented Mar 12, 2026

The idea itself is good, but only valid for the following paths:

+1

@janl
Copy link
Member

janl commented Mar 12, 2026

oh in addition, I just realised how this works, we would want to have a new test target “build website” and run that if there are changes under docs/ and nowhere else. That way we catch docs/website build errors at PR time as well, but no need to run the main pouchdb test suite

We can skip all tests for changes in the .md/text files as outlined here.

@alxndrsn
Copy link
Contributor

In theory I support this, but it may prevent use of github's "required workflows" feature, which blocks PRs from being merged if tests have not passed.

@janl
Copy link
Member

janl commented Mar 15, 2026

In theory I support this, but it may prevent use of github's "required workflows" feature, which blocks PRs from being merged if tests have not passed.

how so?

@Realtin
Copy link
Contributor Author

Realtin commented Mar 26, 2026

@SourceR85 @janl Thank you for the suggestions!

I updated the paths on both workflows.

@janl
Copy link
Member

janl commented Mar 26, 2026

nice lgtm!

@janl janl force-pushed the gh-workflow-ignore-for-doc-changes branch from ca24dae to 412c564 Compare March 26, 2026 14:24
@janl janl merged commit 5105b26 into apache:master Mar 26, 2026
86 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants