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.
feat: add GitHub Actions CI workflow and contribution improvements #4237
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
Uh oh!
There was an error while loading. Please reload this page.
feat: add GitHub Actions CI workflow and contribution improvements #4237
Changes from all commits
5ac5da5File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not silently ignore dependency installation failures
Line 23 masks install errors (
2>/dev/null ... || true), so CI can continue with an invalid environment and produce misleading green builds.Suggested fix
- name: Install dependencies run: | - pip install -e . 2>/dev/null || pip install -r requirements.txt 2>/dev/null || true + set -euo pipefail + if [ -f pyproject.toml ] || [ -f setup.py ]; then + pip install -e . + elif [ -f requirements.txt ]; then + pip install -r requirements.txt + else + echo "No project dependency manifest found (pyproject.toml/setup.py/requirements.txt)" >&2 + exit 1 + fi pip install pytest pytest-cov flake8 mypy📝 Committable suggestion
🤖 Prompt for AI Agents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Type-check step currently passes even when mypy fails
Line 30 converts any mypy non-zero exit into success via
|| echo ..., which disables type-check enforcement.Suggested fix
- name: Type check with mypy run: | - mypy . --ignore-missing-imports 2>/dev/null || echo "mypy not configured" + set -euo pipefail + mypy . --ignore-missing-imports📝 Committable suggestion
🤖 Prompt for AI Agents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test job can pass even when no tests run
Line 33 falls through to
echo "No test framework found"instead of failing, so PRs can pass without executing tests.Suggested fix
- name: Run tests run: | - pytest --tb=short --cov=. --cov-report=term-missing 2>/dev/null || python -m unittest discover 2>/dev/null || echo "No test framework found" + set -euo pipefail + if command -v pytest >/dev/null 2>&1; then + pytest --tb=short --cov=. --cov-report=term-missing + else + python -m unittest discover + fi📝 Committable suggestion
🤖 Prompt for AI Agents
Uh oh!
There was an error while loading. Please reload this page.