Skip to content
This repository has been archived by the owner on Nov 6, 2024. It is now read-only.

Commit

Permalink
Test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dqii committed Jul 23, 2024
1 parent 2632ded commit 86433ca
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 26 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run tests
- name: Build Docker image without cache and run tests
run: |
docker-compose -f docker-compose.test.yml up --exit-code-from test
docker build --no-cache -t lantern-test .
docker run --rm -v ${{ github.workspace }}/test:/test lantern-test /bin/bash -c "/test/run-all.sh || exit 1"
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ RUN git clone https://github.com/citusdata/pg_cron.git /tmp/pg_cron && \
make -j && \
make install

# Install pgvector
# Install pgvector
RUN git clone --branch narek/array-to-sparsevec-casts https://github.com/Ngalstyan4/pgvector.git /tmp/pgvector && \
cd /tmp/pgvector && \
make && \
Expand Down
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Lantern Suite

## Testing

To build Dockerfile:

```bash
docker build -t lantern-suite:latest .
```

To run tests locally:

```bash
# Build the image without cache
docker build --no-cache -t lantern-test .

# Run the tests in the built image
docker run --rm --network host -v $(pwd)/test:/test lantern-test /bin/bash -c "/test/run-all.sh || exit 1"

# Delete the image after running the tests
docker rmi lantern-test
```
22 changes: 0 additions & 22 deletions docker-compose.test.yml

This file was deleted.

2 changes: 1 addition & 1 deletion test/extension-count.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

available_extensions=$(PGPASSWORD=postgres psql -h lantern -U postgres -t -A -c "SELECT name FROM pg_available_extensions WHERE name IN ('lantern', 'lantern_extras', 'pg_cron', 'pg_stat_statements', 'vector');")
available_extensions=$(PGPASSWORD=postgres psql -U postgres -t -A -c "SELECT name FROM pg_available_extensions WHERE name IN ('lantern', 'lantern_extras', 'pg_cron', 'pg_stat_statements', 'vector');")

required_extensions=("lantern" "lantern_extras" "pg_cron" "pg_stat_statements" "vector")
missing_extensions=()
Expand Down

0 comments on commit 86433ca

Please sign in to comment.