Skip to content

Merge pull request #146 from Contrast-Security-OSS/AIML-652_bump_version #1207

Merge pull request #146 from Contrast-Security-OSS/AIML-652_bump_version

Merge pull request #146 from Contrast-Security-OSS/AIML-652_bump_version #1207

Workflow file for this run

name: Build and Test
on:
push:
branches:
- '*' # Run on all branches
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: '3.13'
cache: 'pip' # Enable built-in pip caching
# Install uv tool for dependency management
- name: Install uv
shell: bash
run: |
echo ""
echo "📦 Installing uv package manager..."
if [ "$RUNNER_OS" = "Windows" ]; then
pip install uv==0.10.2 > uv-install.log || (cat uv-install.log && exit 1)
else
pip install uv==0.10.2 > /tmp/uv-install.log || (cat /tmp/uv-install.log && exit 1)
fi
echo "✅ uv installed successfully"
# Install dependencies using uv (Linux/macOS)
- name: Install dependencies with uv
if: runner.os == 'Linux' || runner.os == 'macOS'
shell: bash
run: |
echo ""
echo "📦 Installing Python packages using uv..."
echo "📎 Using lockfile for deterministic installation"
uv pip sync --system ${{ github.workspace }}/src/requirements.lock > /tmp/uv-output.log || (cat /tmp/uv-output.log && exit 1)
echo "✅ Python dependencies installed successfully"
- name: Run Python linting
shell: bash
run: |
echo ""
echo "🔍 Running Python linting using pre-push hook..."
# Use the pre-push hook as single source of truth for linting
./hooks/pre-push
- name: Run tests
shell: bash
run: |
echo ""
echo "🧪 Running tests using test runner script..."
# Use the test script as single source of truth for testing
./test/run_tests.sh --skip-install
env:
GITHUB_TOKEN: ${{ github.token }}