Skip to content

v0.2.2 Optional PostgreSQL Support #3

v0.2.2 Optional PostgreSQL Support

v0.2.2 Optional PostgreSQL Support #3

Workflow file for this run

name: Coverage
on:
release:
types: [published]
jobs:
coverage:
runs-on: ubuntu-22.04
# Service containers to run tests that require connections to postgres
services:
postgres:
image: postgres:17
env:
POSTGRES_PASSWORD: password
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.12"
- name: Install Poetry
uses: abatilo/actions-poetry@v2
- name: Setup a local virtual environment
run: |
poetry config virtualenvs.create true --local
poetry config virtualenvs.in-project true --local
- uses: actions/cache@v3
name: Define a cache for the virtual environment based on the dependencies lock file
with:
path: ./.venv
key: venv-${{ hashFiles('poetry.lock') }}
- name: Install dependencies
run: poetry install --all-extras
- name: Run tests and collect coverage
run: poetry run pytest --cov=sqlift --cov-report=xml
- name: Upload coverage raports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}