Skip to content

feat: configurable tests path and sha-tagged release#2

Merged
hbahadorzadeh merged 4 commits intomainfrom
feat/configurable-tests-path-and-sha-release
Apr 26, 2026
Merged

feat: configurable tests path and sha-tagged release#2
hbahadorzadeh merged 4 commits intomainfrom
feat/configurable-tests-path-and-sha-release

Conversation

@hbahadorzadeh
Copy link
Copy Markdown
Contributor

Summary

  • Add tests_path input: path passed to pytest (directory, file, or node IDs); defaults to project_path
  • Record sha-<shortsha> in the JSONL release log for traceability (PyPI has no dist-tag equivalent)

Changes

action.yml

  • New tests_path input wired to test step via INPUT_TESTS_PATH
  • GITHUB_SHA passed to release step

src/step-test.sh

  • TESTS_PATH defaults to $PROJECT when INPUT_TESTS_PATH is unset; otherwise uses the provided path

src/step-release.sh

  • Logs sha-<shortsha> in the JSONL release event for downstream traceability
  • Prints the sha to stdout after upload

Test plan

  • With tests_path: tests/unit: pytest runs only against tests/unit
  • With default: pytest runs on project root as before
  • Release log contains "sha":"abc1234" field

🤖 Generated with Claude Code

- Add tests_path input: path passed to pytest (directory, file, nodeids); defaults to project_path
- Use INPUT_TESTS_PATH in step-test.sh instead of always running pytest on project root
- Record sha-<short> in the JSONL release log for traceability (PyPI has no dist-tag equivalent)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new tests_path input for the test step, allowing users to specify directories or files for pytest, and adds the git commit SHA to the release logs for improved traceability. Review feedback highlights a potential crash in step-release.sh due to an unbound GITHUB_SHA variable and recommends quoting TESTS_PATH in step-test.sh to correctly handle file paths containing spaces.

Comment thread src/step-release.sh Outdated
Comment thread src/step-test.sh Outdated
hbahadorzadeh and others added 3 commits April 26, 2026 17:52
Replace the per-command psh check-and-wrap pattern with `#!/usr/bin/env psh`
as the shebang so psh intercepts and logs every command in the script
automatically. main.sh already invoked scripts directly so no change needed
there.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…set -u

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@hbahadorzadeh hbahadorzadeh merged commit 92b9839 into main Apr 26, 2026
@hbahadorzadeh hbahadorzadeh deleted the feat/configurable-tests-path-and-sha-release branch April 26, 2026 20:37
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.

1 participant