Skip to content

workflow: Only triggers relevant tests - #107

Open
bact wants to merge 7 commits into
JPEWdev:mainfrom
bact:test-specific-lang
Open

workflow: Only triggers relevant tests#107
bact wants to merge 7 commits into
JPEWdev:mainfrom
bact:test-specific-lang

Conversation

@bact

@bact bact commented Jun 3, 2026

Copy link
Copy Markdown
Collaborator

With growing number of languages, tests, and linting/static checks, we need to reduce the test time.

  • Uses dorny/paths-filter action to triggers only relevant tests.
  • When a language X binding source code is changed, do not trigger tests that are only for non-X languages.

Note:

  • On push events, paths-filter diffs against the previous commit and falls back to "everything changed" if no common ancestor is found - for example, after a force-push. <--- this will lead to all tests being triggered
  • Since paths-filter diffs the whole PR rather than a single commit, a commit that only updates a README will still trigger all tests if any commit in the PR touched that language's files.

@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  src/shacl2code
  model.py
  urlcontext.py
Project Total  

This report was generated by python-coverage-comment-action

@bact
bact marked this pull request as draft June 3, 2026 22:33
@bact bact added the tests Tests, test spec, test data label Jun 4, 2026
@bact
bact force-pushed the test-specific-lang branch from af9fc76 to b41ff95 Compare July 4, 2026 18:12
@bact
bact marked this pull request as ready for review July 4, 2026 22:32
@bact
bact force-pushed the test-specific-lang branch from 998fddb to b88e7b7 Compare July 6, 2026 18:17
@bact

bact commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator Author

Need to update this PR to take changes from recent static analyser additions

@bact
bact marked this pull request as draft July 31, 2026 17:29
bact added 4 commits August 1, 2026 00:31
Uses dorny/paths-filter action to triggers only relevant tests.

When a language X binding source code is changed, do not trigger tests that are only for non-X languages.

Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
(This should only trigger coverage-generate.yaml workflow and not other workflows)

Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
(This should not trigger any language bindings test - since it is a pure documentation change)

Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
@bact
bact force-pushed the test-specific-lang branch from b88e7b7 to 5b05cb3 Compare July 31, 2026 23:32
@bact
bact marked this pull request as ready for review August 1, 2026 07:30
@bact
bact requested a review from JPEWdev August 1, 2026 07:32
run: |
pytest -v
filters: |
core: &core

@JPEWdev JPEWdev Aug 4, 2026

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "core" here confused me as it's not actually used as the "core" filter below. I think this is only stuff that is common to the language filters? Maybe "common" would be a better name

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"common" will be a better name. agree.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests Tests, test spec, test data

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants