Skip to content

Embeddings

Embeddings #6

Workflow file for this run

name: PR Unit Tests
on:
pull_request:
branches:
- develop
- master # Add any other branches where you want to enforce tests
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10" # Change this to match your setup
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
echo "$HOME/.local/bin" >> $GITHUB_PATH
export PATH="$HOME/.local/bin:$PATH"
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
poetry install
pip install pytest
- name: Install Package Locally
run: |
poetry build
pip install dist/*.whl # Install the built package to fix "No module named 'mambular'"
- name: Run Unit Tests
env:
PYTHONPATH: ${{ github.workspace }} # Ensure the package is discoverable
run: pytest tests/
- name: Verify Tests Passed
if: ${{ success() }}
run: echo "All tests passed! Pull request is allowed."
- name: Fail PR on Test Failure
if: ${{ failure() }}
run: exit 1 # This ensures the PR cannot be merged if tests fail