Skip to content

Merge pull request #217 from SCAI-BIO/dependabot/uv/all-dependencies-… #507

Merge pull request #217 from SCAI-BIO/dependabot/uv/all-dependencies-…

Merge pull request #217 from SCAI-BIO/dependabot/uv/all-dependencies-… #507

Workflow file for this run

name: tests
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
build:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
services:
postgres:
image: ankane/pgvector # pgvector-enabled PostgreSQL
ports:
- 5432:5432
env:
POSTGRES_USER: testuser
POSTGRES_PASSWORD: testpass
POSTGRES_DB: testdb
options: >-
--health-cmd="pg_isready -U testuser -d testdb"
--health-interval=10s
--health-timeout=5s
--health-retries=5
env:
TEST_POSTGRES_URI: postgresql://testuser:testpass@localhost:5432/testdb
steps:
- uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v7
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: uv sync --locked --all-extras --dev
- name: Wait for PostgreSQL to become ready
run: |
until pg_isready -h localhost -U testuser -d testdb; do sleep 1; done
- name: Test with pytest
run: uv run pytest --junitxml=junit.xml -o junit_family=legacy --cov=datastew --cov-report=xml
- name: Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}