Skip to content

Bump pypdf from 6.1.1 to 6.1.3 in the pip group across 1 directory #19

Bump pypdf from 6.1.1 to 6.1.3 in the pip group across 1 directory

Bump pypdf from 6.1.1 to 6.1.3 in the pip group across 1 directory #19

name: CLI Compatibility Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
CLI-Compatibility:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
typer-version: ["0.16.0", "0.17.0", "0.18.0", "0.19.2"]
click-version: ["8.1.0", "8.2.0"]
exclude:
- python-version: "3.9"
click-version: "8.2.0"
- typer-version: "0.16.0"
click-version: "8.2.0"
- typer-version: "0.16.0"
click-version: "8.2.1"
- typer-version: "0.16.0"
click-version: "8.3.0"
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Install Dependencies
run: |
# Setup Virtual Environment
python3 -m venv ./.venv
source .venv/bin/activate
# Install dev dependencies
if [ "${{ matrix.python-version }}" == "3.9" ]; then
pip install .[dev]
else
poetry install --extras dev
fi
# Install specific typer and click versions
pip install typer==${{ matrix.typer-version }} click==${{ matrix.click-version }}
- name: Test CLI Commands
run: |
source .venv/bin/activate
# Test basic CLI help
guardrails --help
# Test validate command help
guardrails validate --help
# Test hub command help
guardrails hub --help
# Test configure command help
guardrails configure --help
# Test hub list command (end-to-end)
guardrails hub list
# Create a simple RAIL spec for testing validate command
cat > test_spec.rail << 'EOF'
<rail version="0.1">
<output>
<string name="answer" description="A simple answer"/>
</output>
<prompt>
Answer the question: What is 2+2?
</prompt>
</rail>
EOF
# Test validate command end-to-end with the RAIL spec
echo '{"answer": "4"}' | guardrails validate test_spec.rail -
# Clean up
rm test_spec.rail