Repository navigation
New pullrequest - #5610
Open
maxmudyasin wants to merge 2 commits into
Open
New pullrequest#5610maxmudyasin wants to merge 2 commits into
maxmudyasin wants to merge 2 commits into
Conversation
This workflow installs Python dependencies, runs linting with flake8, and executes tests with pytest on push and pull request events to the main branch.
Add GitHub Actions workflow for Python application
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The workflow has active critical and moderate issues: it uses an unsupported Python version, skips installing the package and test dependencies, and relies on mutable action tags that violate the repository’s SHA-pinning contract.
4 open issues
What changed in this PR
Adds a GitHub Actions workflow to lint and test the Python project on pushes and pull requests targeting main.
Changes:
- Configures an Ubuntu runner with Python and read-only repository permissions.
- Installs linting and test tools and optionally project requirements.
- Runs Flake8 checks followed by the pytest suite.
| File | Description |
|---|---|
| .github/workflows/python-app.yml | Adds a GitHub Actions workflow for Python environment setup, dependency installation, linting, and pytest execution. |
Review effort: Lite (adaptive)
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 |
Comment on lines
+21
to
+23
| - uses: actions/checkout@v4 | ||
| - name: Set up Python 3.10 | ||
| uses: actions/setup-python@v3 |
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install flake8 pytest | ||
| if [ -f requirements.txt ]; then pip install -r requirements.txt; fi |
Comment on lines
+22
to
+25
| - name: Set up Python 3.10 | ||
| uses: actions/setup-python@v3 | ||
| with: | ||
| python-version: "3.10" |
This branch has not been deployed
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
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.


Description
Testing
Set up this checkout's
.venvand editable install using the local development guide. Run commands from the checkout root..venv/bin/specify --help(Windows PowerShell:.\.venv\Scripts\specify.exe --help).venv/bin/python -m pytest tests -q(Windows PowerShell:.\.venv\Scripts\python.exe -m pytest tests -q); use affected test paths for focused checks andLC_ALL=en_US.UTF-8on macOSAI Disclosure
AI disclosure: N/A