Skip to content

fix: preserve backup path env and bump 0.1.1 #30

fix: preserve backup path env and bump 0.1.1

fix: preserve backup path env and bump 0.1.1 #30

Workflow file for this run

name: CI
on:
push:
pull_request:
jobs:
tests:
runs-on: ubuntu-latest
services:
db:
image: pgvector/pgvector:pg16
env:
POSTGRES_DB: shellbrain_ci_test
POSTGRES_USER: shellbrain
POSTGRES_PASSWORD: shellbrain
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U shellbrain -d shellbrain_ci_test"
--health-interval 10s
--health-timeout 5s
--health-retries 10
env:
SHELLBRAIN_DB_DSN: postgresql+psycopg://shellbrain:shellbrain@localhost:5432/shellbrain
SHELLBRAIN_DB_DSN_TEST: postgresql+psycopg://shellbrain:shellbrain@localhost:5432/shellbrain_ci_test
SHELLBRAIN_HOME: ${{ github.workspace }}/.shellbrain-home
HF_HOME: ${{ github.workspace }}/.cache/huggingface
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: "pip"
- name: Cache embedding model downloads
uses: actions/cache@v4
with:
path: |
${{ github.workspace }}/.cache/huggingface
key: ${{ runner.os }}-sentence-transformers-${{ hashFiles('requirements.txt', 'app/config/defaults/runtime.yaml') }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run tests
run: ./scripts/run_tests
- name: Add visualization report to summary
if: always()
run: |
REPORT="tests/visualization/artifacts/tests_status.md"
if [ -f "$REPORT" ]; then
cat "$REPORT" >> "$GITHUB_STEP_SUMMARY"
else
echo "Visualization report not found: $REPORT" >> "$GITHUB_STEP_SUMMARY"
fi
- name: Upload visualization report artifact
if: always()
uses: actions/upload-artifact@v4
with:
name: tests-status-report
path: tests/visualization/artifacts/tests_status.md
if-no-files-found: warn
packaging-smoke:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
env:
SHELLBRAIN_HOME: ${{ github.workspace }}/.shellbrain-home
HF_HOME: ${{ github.workspace }}/.cache/huggingface
PIPX_HOME: ${{ github.workspace }}/.pipx
PIPX_BIN_DIR: ${{ github.workspace }}/.pipx/bin
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: "pip"
- name: Install packaging tooling
run: |
python -m pip install --upgrade pip pipx
- name: Smoke test pipx install
run: |
python -m pipx install .
"$PIPX_BIN_DIR/shellbrain" --help
"$PIPX_BIN_DIR/shellbrain" init --help
- name: Run packaging smoke tests
run: |
python -m pip install pytest 'psycopg[binary]>=3.1,<4.0'
python -m pytest -q tests/config/test_packaging_smoke.py