Skip to content
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

Add coveralls support #100

Merged
merged 4 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 28 additions & 20 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,43 @@ jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
postgres-version: ['15.1.1.78']
matrix:
python-version: ['3.8']
postgres-version: ['15.1.1.78']

services:

postgres:
image: supabase/postgres:${{ matrix.postgres-version }}
env:
POSTGRES_DB: vecs_db
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
ports:
- 5611:5432
- 5611:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: install
run: |
pip install --upgrade pip
pip install wheel
pip install -e ".[dev, text_embedding]"

- name: test with coverage
run: |
pytest
- uses: actions/checkout@v3

- name: set up python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: install
run: |
pip install --upgrade pip
pip install wheel
pip install -e ".[dev, text_embedding]"

- name: test with coverage
run: |
pip install coverage coveralls
coverage run --source=vecs -m pytest
coverage report

- name: upload coverage to coveralls
run: coveralls
env:
coveralls_repo_token: ${{ secrets.COVERALLS_REPO_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion pytest.ini
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[pytest]
addopts = --cov=src/vecs src/tests
addopts = src/tests
Loading