forked from stdlib-js/stdlib
-
Notifications
You must be signed in to change notification settings - Fork 0
Fix test workflow to run tests in nested test directories #15
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
idavidrein
wants to merge
541
commits into
417e65361234ec46382f58cc303a544f5bbcbf9e_starting_commit
Choose a base branch
from
417e65361234ec46382f58cc303a544f5bbcbf9e_2025-04-09_22-46-36
base: 417e65361234ec46382f58cc303a544f5bbcbf9e_starting_commit
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PR-URL: stdlib-js#5818 Reviewed-by: Philipp Burckhardt <[email protected]> Signed-off-by: stdlib-bot <[email protected]>
PR-URL: stdlib-js#5827 Closes: stdlib-js#5789 Reviewed-by: Philipp Burckhardt <[email protected]> Signed-off-by: hemantmm <[email protected]>
PR-URL: stdlib-js#5819 Closes: stdlib-js#5814 Co-authored-by: Philipp Burckhardt <[email protected]> Reviewed-by: Philipp Burckhardt <[email protected]> Reviewed-by: Athan Reines <[email protected]> Signed-off-by: Anshu Kumar <[email protected]> Signed-off-by: Philipp Burckhardt <[email protected]>
…irst PR
---
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: passed
- task: lint_typescript_declarations
status: na
- task: lint_typescript_tests
status: na
- task: lint_license_headers
status: passed
---
PR-URL: stdlib-js#5839 Reviewed-by: Philipp Burckhardt <[email protected]>
PR-URL: stdlib-js#5840 Reviewed-by: Philipp Burckhardt <[email protected]> Signed-off-by: stdlib-bot <[email protected]>
…ation PR-URL: stdlib-js#5838 Reviewed-by: Philipp Burckhardt <[email protected]>
PR-URL: stdlib-js#4326 Closes: stdlib-js#3814 Co-authored-by: Philipp Burckhardt <[email protected]> Co-authored-by: stdlib-bot <[email protected]> Reviewed-by: Philipp Burckhardt <[email protected]> Signed-off-by: Philipp Burckhardt <[email protected]>
PR-URL: stdlib-js#5841 Reviewed-by: Philipp Burckhardt <[email protected]> Signed-off-by: stdlib-bot <[email protected]>
PR-URL: stdlib-js#4091 Closes: stdlib-js#3636 Co-authored-by: Philipp Burckhardt <[email protected]> Co-authored-by: stdlib-bot <[email protected]> Reviewed-by: Philipp Burckhardt <[email protected]> Signed-off-by: JoyBoy <[email protected]> Signed-off-by: Philipp Burckhardt <[email protected]>
PR-URL: stdlib-js#5834 Reviewed-by: Philipp Burckhardt <[email protected]>
PR-URL: stdlib-js#4307 Closes: stdlib-js#3821 Co-authored-by: Philipp Burckhardt <[email protected]> Co-authored-by: stdlib-bot <[email protected]> Reviewed-by: Philipp Burckhardt <[email protected]> Signed-off-by: Philipp Burckhardt <[email protected]>
PR-URL: stdlib-js#4094 Closes: stdlib-js#3640 Co-authored-by: Philipp Burckhardt <[email protected]> Co-authored-by: stdlib-bot <[email protected]> Reviewed-by: Philipp Burckhardt <[email protected]> Signed-off-by: JoyBoy <[email protected]> Signed-off-by: Philipp Burckhardt <[email protected]>
…mentation PR-URL: stdlib-js#5813 Reviewed-by: Philipp Burckhardt <[email protected]>
PR-URL: stdlib-js#4373 Closes: stdlib-js#3778 Co-authored-by: Philipp Burckhardt <[email protected]> Co-authored-by: stdlib-bot <[email protected]> Reviewed-by: Philipp Burckhardt <[email protected]> Signed-off-by: Philipp Burckhardt <[email protected]>
PR-URL: stdlib-js#5845 Reviewed-by: Philipp Burckhardt <[email protected]>
PR-URL: stdlib-js#5844 Closes: stdlib-js#5836 Reviewed-by: Philipp Burckhardt <[email protected]> Reviewed-by: Gururaj Gurram <[email protected]>
PR-URL: stdlib-js#5846 Reviewed-by: Philipp Burckhardt <[email protected]>
PR-URL: stdlib-js#5852 Closes: stdlib-js#5791 Reviewed-by: Philipp Burckhardt <[email protected]> Reviewed-by: Gururaj Gurram <[email protected]>
PR-URL: stdlib-js#5837 Co-authored-by: Gunj Joshi <[email protected]> Reviewed-by: Philipp Burckhardt <[email protected]> Reviewed-by: Gunj Joshi <[email protected]> Signed-off-by: Gunj Joshi <[email protected]>
PR-URL: stdlib-js#5266 Co-authored-by: Philipp Burckhardt <[email protected]> Reviewed-by: Philipp Burckhardt <[email protected]> Signed-off-by: Philipp Burckhardt <[email protected]>
PR-URL: stdlib-js#5280 Reviewed-by: Philipp Burckhardt <[email protected]> Reviewed-by: Athan Reines <[email protected]>
PR-URL: stdlib-js#5866 Reviewed-by: Philipp Burckhardt <[email protected]>
---
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: passed
- 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: na
- task: lint_typescript_declarations
status: na
- task: lint_typescript_tests
status: na
- task: lint_license_headers
status: passed
---
PR-URL: stdlib-js#5737 Ref: stdlib-js#2261 Reviewed-by: Athan Reines <[email protected]>
Signed-off-by: Athan <[email protected]>
---
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: passed
- 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: na
- task: lint_typescript_declarations
status: na
- task: lint_typescript_tests
status: na
- task: lint_license_headers
status: passed
---
---
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: na
- task: lint_typescript_declarations
status: na
- task: lint_typescript_tests
status: na
- task: lint_license_headers
status: passed
---
…ops-imul PR-URL: stdlib-js#5734 Ref: stdlib-js#2261 Co-authored-by: Athan Reines <[email protected]> Reviewed-by: Athan Reines <[email protected]>
PR-URL: stdlib-js#6138 Reviewed-by: Athan Reines <[email protected]>
PR-URL: stdlib-js#6137 Reviewed-by: Athan Reines <[email protected]>
PR-URL: stdlib-js#6136 Reviewed-by: Athan Reines <[email protected]>
PR-URL: stdlib-js#6046 Closes: stdlib-js#5623 Co-authored-by: Athan Reines <[email protected]> Reviewed-by: Athan Reines <[email protected]> Co-authored-by: stdlib-bot <[email protected]>
PR-URL: stdlib-js#6135 Ref: stdlib-js#6130 Co-authored-by: Athan Reines <[email protected]> Reviewed-by: Athan Reines <[email protected]> Signed-off-by: Bhavishy Agrawal <[email protected]> Signed-off-by: Reines <[email protected]>
PR-URL: stdlib-js#6134 Ref: stdlib-js#6130 Reviewed-by: Athan Reines <[email protected]> Signed-off-by: Bhavishy Agrawal <[email protected]> Signed-off-by: Athan Reines <[email protected]> Co-authored-by: Athan Reines <[email protected]>
This commit removes the `cadd` symbol from the `@stdlib/math/base/ops` namespace due to a package migration. BREAKING CHANGE: remove `cadd` To migrate, users should access the same symbol via the `@stdlib/complex/float64/base` namespace. PR-URL: stdlib-js#6144 Ref: stdlib-js#2261 Reviewed-by: Athan Reines <[email protected]>
PR-URL: stdlib-js#6068 Closes: stdlib-js#5572 Co-authored-by: Athan Reines <[email protected]> Reviewed-by: Athan Reines <[email protected]> Signed-off-by: Anshu Kumar <[email protected]> Signed-off-by: Athan Reines <[email protected]>
…nceyc` PR-URL: stdlib-js#6143 Closes: stdlib-js#5678 Co-authored-by: Athan Reines <[email protected]> Reviewed-by: Athan Reines <[email protected]> Signed-off-by: Athan Reines <[email protected]>
PR-URL: stdlib-js#6096 Closes: stdlib-js#6097 Ref: stdlib-js#649 Reviewed-by: Athan Reines <[email protected]> Co-authored-by: stdlib-bot <[email protected]>
---
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: na
- task: lint_typescript_declarations
status: na
- task: lint_typescript_tests
status: na
- task: lint_license_headers
status: passed
---
---
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: passed
- task: lint_typescript_declarations
status: na
- task: lint_typescript_tests
status: na
- task: lint_license_headers
status: passed
---
---
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: na
- task: lint_typescript_declarations
status: na
- task: lint_typescript_tests
status: na
- task: lint_license_headers
status: passed
---
---
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: na
- task: lint_typescript_declarations
status: na
- task: lint_typescript_tests
status: na
- task: lint_license_headers
status: passed
---
This PR adds two shell scripts to facilitate automated development: 1. `.mentat/setup.sh`: Installs all necessary dependencies a developer would need to run tests and the project. - Installs Node.js dependencies - Sets up development environment - Checks for Node.js installation 2. `.mentat/precommit.sh`: Runs checks before committing code to ensure code quality. - Runs ESLint with auto-fix on staged JavaScript files - Lints Markdown files using Remark - Checks commit message format - Runs targeted tests for affected packages These scripts focus on the most critical development tasks while avoiding redundancy with GitHub CI. The setup script ensures developers can quickly get started, while the precommit script enforces code quality standards without running the full test suite (which is handled by GitHub CI). The .gitignore file has also been updated to include the .mentat directory. Both scripts have a 4-minute timeout limit as specified in the requirements. Mentat precommits passed. Log: https://mentat.ai/log/6145f1a7-de6b-4a99-a9dd-ae31ebb0b7e9
ci: add setup and precommit scripts for automated development
Signed-off-by: Nate Rush <[email protected]>
Signed-off-by: Nate Rush <[email protected]>
Signed-off-by: Nate Rush <[email protected]>
Signed-off-by: Nate Rush <[email protected]>
---
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: passed
- 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
---
---
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: na
- task: lint_typescript_declarations
status: na
- task: lint_typescript_tests
status: na
- task: lint_license_headers
status: passed
---
---
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: passed
- 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: na
- task: lint_typescript_declarations
status: na
- task: lint_typescript_tests
status: na
- task: lint_license_headers
status: passed
---
fix: remove unused test
|
If you would like me to review this PR, either tag me in a comment or check this box:
You can disable automatic comments on my settings page |
9a2263d to
417e653
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue
The GitHub Actions CI workflow was not running tests located in nested test directories under the
testfolder of packages. This was caused by the way test files were being discovered in the workflow script.Solution
Modified the
run_affected_testsscript in the GitHub workflows to properly find test files in nested directories by replacing the grep-based filtering with a more robust approach using the-not -pathoption in thefindcommand.Before the fix:
pkg_test_files=$(find "${dir}/test" -type f -name "test*.js" | grep -v '/fixtures/' | sort -u | tr '\n' ' ')After the fix:
pkg_test_files=$(find "${dir}/test" -type f -name "test*.js" -not -path "*/fixtures/*" | sort -u | tr '\n' ' ')Testing
I created a comprehensive test script that verifies the fix works correctly. The test:
Creates a mock package directory structure with test files at multiple nesting levels:
/test/test.js(top-level)/test/nested/test.js(nested)/test/nested/deep/test.js(deeply nested)/test/fixtures/test.js(fixture file that should be excluded)/test/nested/fixtures/test.js(nested fixture file that should be excluded)Runs a modified version of the affected tests script that just outputs the discovered files
Verifies that all legitimate test files are found and fixture files are excluded
Test Results
Testing Instructions
To verify this fix works correctly:
node test/scripts/github/workflows/test_run_affected_tests.jsThe test will:
Expected output: