-
Notifications
You must be signed in to change notification settings - Fork 161
ci: add GitHub Actions workflow to run Python tests (pytest) #123
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
base: main
Are you sure you want to change the base?
Conversation
.github/workflows/python-ci.yml
Outdated
|
|
||
| on: | ||
| push: | ||
| branches: [ main, master ] |
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.
we don't have master branch, remove it
.github/workflows/python-ci.yml
Outdated
| push: | ||
| branches: [ main, master ] | ||
| pull_request: | ||
| branches: [ main, master ] |
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.
we don't have master branch, remove it
.github/workflows/python-ci.yml
Outdated
| strategy: | ||
| matrix: | ||
| python-version: [3.10, 3.11] |
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.
Add timeout for the job
| strategy: | |
| matrix: | |
| python-version: [3.10, 3.11] | |
| timeout-minutes: 20 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: [ '3.10', '3.11', '3.12' ] |
| - name: Set up Python ${{ matrix.python-version }} | ||
| uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} |
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.
Add cache for pip:
cache: pip
# Cache will be restored/updated when any of these files change
cache-dependency-path: |
requirements*.txt
pyproject.toml
poetry.lock
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.
please fix comments prior to merge
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.
Hi @sferro998866 and maintainers — thanks for the helpful review. I pushed an update (commit 7ad3f4a) addressing your comments:
Removed references to the non-existent master branch from push and pull_request triggers.
Extended the Python matrix to include 3.12.
Added timeout-minutes: 20 to avoid runaway jobs and set strategy.fail-fast: false so parallel jobs don't abort the matrix on the first failure.
Enabled pip caching (cache: pip) and added cache-dependency-path for requirements*.txt, pyproject.toml, and poetry.lock to speed up dependency installs.
The changes are on palanikalyan/memori4:feat/ci-python-tests (commit 7ad3f4a). If you want the workflow to use a different dependency file (e.g., requirements.txt vs requirements-dev.txt) or additional Python versions, I can adjust it quickly.
Because this originates from a fork, a maintainer will need to approve workflow runs for the Actions to run. Once approved I’ll monitor the workflow and iterate on any failing tests.
@GibsonAI/maintainers — this PR adds a workflow from a fork; could someone please approve the workflow run so CI can execute? Thanks!
Adds a GitHub Actions workflow to run Python test suites with pytest on push and pull requests. This ensures tests run automatically on GitHub for Python 3.10 and 3.11.