Skip to content

Storage Backends

Storage Backends #62

name: Storage Backends
on:
schedule:
# Daily at 03:00 UTC — runs against SQLite, Postgres, and MySQL.
- cron: '0 3 * * *'
workflow_dispatch:
inputs:
backend:
description: 'Backend(s) to test: sqlite, postgres, mysql, or all'
required: false
default: 'sqlite postgres mysql'
concurrency:
group: storage-backends-${{ github.ref }}
cancel-in-progress: true
jobs:
storage-tests:
runs-on: ubuntu-latest
permissions:
contents: read
services:
postgres:
image: postgres:16
env:
POSTGRES_USER: nyro
POSTGRES_PASSWORD: nyro
POSTGRES_DB: nyro_test
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 5s
--health-timeout 5s
--health-retries 10
mysql:
image: mysql:8
env:
MYSQL_ROOT_PASSWORD: nyro
MYSQL_DATABASE: nyro_test
MYSQL_USER: nyro
MYSQL_PASSWORD: nyro
ports:
- 3306:3306
options: >-
--health-cmd "mysqladmin ping -h 127.0.0.1"
--health-interval 5s
--health-timeout 5s
--health-retries 10
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Rust cache
uses: Swatinem/rust-cache@v2
- name: Install Linux system deps
run: |
sudo apt-get update -qq
sudo apt-get install -y --no-install-recommends \
pkg-config libssl-dev
- name: Install Python test deps
run: python3 -m pip install -r requirements-dev.txt
- name: Run storage E2E tests (sqlite)
run: python3 -m pytest tests/e2e/storage/test_storage.py -vv -s -rA -m storage -k sqlite
- name: Run storage E2E tests (postgres)
run: python3 -m pytest tests/e2e/storage/test_storage.py -vv -s -rA -m storage -k postgres
env:
DB_URL: postgresql://nyro:nyro@localhost:5432/nyro_test
- name: Run storage E2E tests (mysql)
run: python3 -m pytest tests/e2e/storage/test_storage.py -vv -s -rA -m storage -k mysql
env:
MYSQL_URL: mysql://nyro:nyro@localhost:3306/nyro_test