Skip to content

build: update pre-push hook to run package tests on source changes #5548

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

headlessNode
Copy link
Member

Description

What is the purpose of this pull request?

This pull request:

  • updates the pre-push git hook to run tests when the source files are modified.
  • If the C source or manifest.json is modified, the native-addons are compiled before running the tests.

Related Issues

Does this pull request have any related issues?

This pull request:

Questions

Any questions for reviewers of this pull request?

Do we need to add support for julia, R or python?.

Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

No.

Checklist

Please ensure the following tasks are completed before submitting this pull request.


@stdlib-js/reviewers

---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
  - task: lint_filenames
    status: passed
  - task: lint_editorconfig
    status: passed
  - task: lint_markdown
    status: na
  - task: lint_package_json
    status: na
  - task: lint_repl_help
    status: na
  - task: lint_javascript_src
    status: na
  - task: lint_javascript_cli
    status: na
  - task: lint_javascript_examples
    status: na
  - task: lint_javascript_tests
    status: na
  - task: lint_javascript_benchmarks
    status: na
  - task: lint_python
    status: na
  - task: lint_r
    status: na
  - task: lint_c_src
    status: na
  - task: lint_c_examples
    status: na
  - task: lint_c_benchmarks
    status: na
  - task: lint_c_tests_fixtures
    status: na
  - task: lint_shell
    status: missing_dependencies
  - task: lint_typescript_declarations
    status: na
  - task: lint_typescript_tests
    status: na
  - task: lint_license_headers
    status: passed
---
@headlessNode headlessNode added the Tools Issue or pull request related to project tooling. label Mar 1, 2025
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Mar 1, 2025
Signed-off-by: Muhammad Haris <[email protected]>
@kgryte
Copy link
Member

kgryte commented Mar 1, 2025

Do we need to add support for julia, R or python?.

You asking specifically about when fixtures runners change, correct?

@headlessNode
Copy link
Member Author

@kgryte Uh... I was asking about the source but now that I think about it, I think I only saw Fortran source in some of BLAS packages.

But yeah, also when fixtures runners change.

@kgryte
Copy link
Member

kgryte commented Mar 1, 2025

I was asking about the source but now that I think about it, I think I only saw Fortran source in some of BLAS packages.

Only Fortran and C files from the src folder.

Test fixture runners.

Actually, only when the generated fixtures change, not the runners. E.g., fixtures/data.json. Meaning, if a JSON file changes in a fixtures file, we should rerun the tests, but not the runners themselves.

@headlessNode
Copy link
Member Author

headlessNode commented Mar 1, 2025

@kgryte For testing, could you let me know a package which has all of those? i.e. JS, C, Fortran, fixtures

nvm, I greped it.

---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
  - task: lint_filenames
    status: passed
  - task: lint_editorconfig
    status: passed
  - task: lint_markdown
    status: na
  - task: lint_package_json
    status: na
  - task: lint_repl_help
    status: na
  - task: lint_javascript_src
    status: na
  - task: lint_javascript_cli
    status: na
  - task: lint_javascript_examples
    status: na
  - task: lint_javascript_tests
    status: na
  - task: lint_javascript_benchmarks
    status: na
  - task: lint_python
    status: na
  - task: lint_r
    status: na
  - task: lint_c_src
    status: na
  - task: lint_c_examples
    status: na
  - task: lint_c_benchmarks
    status: na
  - task: lint_c_tests_fixtures
    status: na
  - task: lint_shell
    status: missing_dependencies
  - task: lint_typescript_declarations
    status: na
  - task: lint_typescript_tests
    status: na
  - task: lint_license_headers
    status: passed
---
@headlessNode headlessNode requested a review from kgryte March 1, 2025 10:42
@Planeshifter Planeshifter added the Potential Duplicate There might be another pull request resolving the same issue. label Mar 15, 2025
@kgryte kgryte removed the Potential Duplicate There might be another pull request resolving the same issue. label Mar 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review A pull request which needs code review. Tools Issue or pull request related to project tooling.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[RFC]: add support to pre-push Git hook to run package tests after changing source files
4 participants