Skip to content

feat(RHOAIENG-21043): Add protobuf support #5

feat(RHOAIENG-21043): Add protobuf support

feat(RHOAIENG-21043): Add protobuf support #5

Workflow file for this run

name: Python Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install uv
python -m venv .venv
source .venv/bin/activate
if [ -f pyproject.toml ]; then
uv pip install -e ".[dev,protobuf]"
else
uv pip install pytest
fi
- name: Install protobuf compiler
run: |
sudo apt-get update
sudo apt-get install -y protobuf-compiler
- name: Generate protobuf stubs
run: |
source .venv/bin/activate
bash scripts/generate_protos.sh
- name: Run tests with pytest
run: |
source .venv/bin/activate
pytest tests/ -v --cov=src --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
file: ./coverage.xml
fail_ci_if_error: false