Skip to content

Commit

Permalink
Merge pull request #100 from supabase/or/coveralls
Browse files Browse the repository at this point in the history
Add coveralls support
  • Loading branch information
olirice authored Dec 17, 2024
2 parents c893d56 + 6a62cf0 commit ab08b1f
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 21 deletions.
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

0 comments on commit ab08b1f

Please sign in to comment.