-
-
Notifications
You must be signed in to change notification settings - Fork 16
add GitHub Actions workflow for Postgres memory tests #95
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
Open
AmitKarnam
wants to merge
8
commits into
Siddhant-K-code:main
Choose a base branch
from
AmitKarnam:feature/postgres-memory-store
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
8d9187d
add GitHub Actions workflow for Postgres memory tests
AmitKarnam 9bfd396
chore(tests): update actions versions and remove wait step for Postgr…
AmitKarnam 9c3682d
feat(postgres): implement PostgresStore with memory management and co…
AmitKarnam 89bf319
feat(postgres): add findSimilar method for cosine distance search in …
AmitKarnam 46dd3ec
feat(postgres): implement Recall and Forget methods in PostgresStore
AmitKarnam 025d6d1
Refactor SQLiteStore: Remove unused memory hint functions and add Pos…
AmitKarnam fb781b4
refactor(postgres): streamline migration logic by using a loop for SQ…
AmitKarnam f033709
Merge branch 'main' into feature/postgres-memory-store
AmitKarnam File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| name: Postgres memory store tests | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ main ] | ||
| pull_request: | ||
| branches: [ main ] | ||
|
|
||
| jobs: | ||
| postgres-tests: | ||
| runs-on: ubuntu-latest | ||
| services: | ||
| postgres: | ||
| image: postgres:15 | ||
| env: | ||
| POSTGRES_USER: postgres | ||
| POSTGRES_PASSWORD: postgres | ||
| POSTGRES_DB: distill_test | ||
| ports: | ||
| - 5432:5432 | ||
| options: >- | ||
| --health-cmd "pg_isready -U postgres -d distill_test" | ||
| --health-interval 5s --health-timeout 5s --health-retries 5 | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Go | ||
| uses: actions/setup-go@v4 | ||
| with: | ||
| go-version: '1.24' | ||
|
|
||
| - name: Wait for Postgres | ||
| run: | | ||
| for i in {1..10}; do | ||
| pg_isready -h localhost -p 5432 -U postgres && break || sleep 2 | ||
| done | ||
|
|
||
| - name: Run tests (with Postgres DSN) | ||
| env: | ||
| POSTGRES_DSN: postgres://postgres:postgres@localhost:5432/distill_test?sslmode=disable | ||
| run: | | ||
| go test -tags=postgres ./... -v | ||
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.
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.
This will pass vacuously right now — there are no
*_test.gofiles with thepostgresbuild tag yet, sogo test -tags=postgres ./...runs zero postgres-specific tests and exits 0.That's fine for a draft, but worth noting: the CI green light here doesn't mean the implementation is tested. Tests need to land before this workflow is meaningful.
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.
@Siddhant-K-code The
postgres_test.go( ref ) is present with thepostgrestag, go running the tag will run the required test suite for postgres package.