name: SqlStore Integration Tests run-name: Run the integration test suite with SqlStore on: push: branches: - main - 'release-[0-9]+.[0-9]+.x' pull_request: branches: - main - 'release-[0-9]+.[0-9]+.x' paths: - 'src/llama_stack/providers/utils/sqlstore/**' - 'tests/integration/sqlstore/**' - 'uv.lock' - 'pyproject.toml' - 'requirements.txt' - '.github/workflows/integration-sql-store-tests.yml' # This workflow concurrency: group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_id || github.ref }} cancel-in-progress: true jobs: test-postgres: runs-on: ubuntu-latest strategy: matrix: python-version: ["3.12", "3.13"] fail-fast: false services: postgres: image: postgres:15 env: POSTGRES_USER: llamastack POSTGRES_PASSWORD: llamastack POSTGRES_DB: llamastack ports: - 5432:5432 options: >- --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 steps: - name: Checkout repository uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - name: Install dependencies uses: ./.github/actions/setup-runner with: python-version: ${{ matrix.python-version }} - name: Run SqlStore Integration Tests env: ENABLE_POSTGRES_TESTS: "true" POSTGRES_HOST: localhost POSTGRES_PORT: 5432 POSTGRES_DB: llamastack POSTGRES_USER: llamastack POSTGRES_PASSWORD: llamastack run: | uv run pytest -sv tests/integration/providers/utils/sqlstore/ - name: Upload test logs if: ${{ always() }} uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 with: name: postgres-test-logs-${{ github.run_id }}-${{ github.run_attempt }}-${{ matrix.python-version }} path: | *.log retention-days: 1