Skip to content

Initial commit: deterministic invoice extraction pipeline #4

Initial commit: deterministic invoice extraction pipeline

Initial commit: deterministic invoice extraction pipeline #4

Workflow file for this run

name: CI
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip dependencies
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner. os }}-pip-${{ hashFiles('pyproject.toml') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
make install-dev
- name: Run linting
run: |
make lint
- name: Run tests
run: |
make test
- name: Run golden tests
run: |
make test-golden
- name: Test determinism
run: |
make determinism-check
- name: Upload artifacts on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: test-artifacts-${{ matrix. python-version }}
path: |
artifacts/
data/logs/
retention-days: 7
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results-${{ matrix.python-version }}
path: |
artifacts/
retention-days: 30
integration:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
make install
- name: Test CLI entry points
run: |
# Test run-pipeline command exists
run-pipeline --help
# Test that it can process seed files
run-pipeline pipeline --seed-folder seed_pdfs/
- name: Verify outputs
run: |
# Check that outputs exist and are valid JSON
ls -la data/predictions/
# Validate JSON structure
for json_file in data/predictions/*.json; do
echo "Validating $json_file"
python -m json.tool "$json_file" > /dev/null
echo "✓ Valid JSON: $(basename "$json_file")"
done
- name: Upload integration artifacts
uses: actions/upload-artifact@v4
with:
name: integration-outputs
path: |
data/predictions/
data/logs/
retention-days: 7