Skip to content

Logging: use null handler #361

Logging: use null handler

Logging: use null handler #361

Workflow file for this run

name: Verify Backend Code Quality & Security
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
quality:
env:
WATSONX_API_KEY: ${{ secrets.WATSONX_API_KEY }}
WATSONX_PROJECT_ID: ${{ secrets.WATSONX_PROJECT_ID }}
WATSONX_URL: "https://us-south.ml.cloud.ibm.com"
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install requirements
working-directory: backend
run: |
pip install poetry
poetry install --extras 'dev webapp'
- name: Run pre-commit hooks
working-directory: backend
run: |
poetry run pre-commit install
poetry run pre-commit run --all-files
- name: Start the server
working-directory: backend
run: |
poetry run eval-assist serve & sleep 45
- name: Health endpoint test
run: |
curl -f http://127.0.0.1:8000/api/health || (echo "App did not start correctly" && exit 1)
- name: Run pytest with coverage
working-directory: backend
run: |
poetry run pytest --cov=evalassist -q
# - name: Run run_judge Python files
# working-directory: backend
# run: |
# for file in examples/run_judge*.py; do
# echo "Running $file"
# poetry run python "$file"
# done
- name: Send failure message
if: failure() # This step will only run if a previous step failed
run: echo "The quality & security verification failed. This is likely due to not using pre-commit hooks please run 'pre-commit install' before any commit."