Skip to content

feat: add anyvlm database #174

feat: add anyvlm database

feat: add anyvlm database #174

Workflow file for this run

name: Python package
on:
push:
pull_request:
permissions:
contents: read
jobs:
test:
name: test
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11", "3.12", "3.13"]
services:
postgres:
image: postgres:17
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "${{ matrix.python-version }}"
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
- name: Install dependencies
run: uv sync --extra test
- name: Run tests
run: uv run pytest
env:
ANYVLM_ANYVAR_TEST_STORAGE_URI: postgresql://postgres:postgres@localhost:5432/postgres
ANYVLM_TEST_STORAGE_URI: postgresql://postgres:postgres@localhost:5432/postgres
lint:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
- name: Install dependencies
run: uv sync --extra dev
- name: Check style
run: uv run ruff check && uv run ruff format --check
precommit_hooks:
runs-on: ubuntu-latest
strategy:
matrix:
cmd:
- "end-of-file-fixer"
- "trailing-whitespace"
- "mixed-line-ending"
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: 3.12
- uses: pre-commit/[email protected]
with:
extra_args: ${{ matrix.cmd }} --all-files