Skip to content

Conversation

@palanikalyan
Copy link

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.


on:
push:
branches: [ main, master ]

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

push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]

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

Comment on lines 12 to 14
strategy:
matrix:
python-version: [3.10, 3.11]

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

Suggested change
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 }}

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
Copy link

@sferro998866 sferro998866 left a 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

Copy link
Author

@palanikalyan palanikalyan left a 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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants