diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0694f67..45228a2 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -6,12 +6,11 @@ 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: @@ -19,22 +18,31 @@ jobs: 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 }} diff --git a/pytest.ini b/pytest.ini index 4710f24..d888c9e 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,2 +1,2 @@ [pytest] -addopts = --cov=src/vecs src/tests +addopts = src/tests