chore(deps): bump starlette from 1.0.0 to 1.0.1 in /src/ContentProcessorAPI #885
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test Workflow | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - dev | |
| - demo | |
| - psl-unit-test-cps-v2 | |
| paths: | |
| - 'src/**/*.py' | |
| - 'tests/**/*.py' | |
| - 'src/**/requirements.txt' | |
| - 'src/**/pyproject.toml' | |
| - 'src/**/pytest.ini' | |
| - 'src/**/conftest.py' | |
| - '.github/workflows/test.yml' | |
| pull_request: | |
| types: | |
| - opened | |
| - ready_for_review | |
| - reopened | |
| - synchronize | |
| branches: | |
| - main | |
| - dev | |
| - demo | |
| - dependabotchanges | |
| paths: | |
| - 'src/**/*.py' | |
| - 'tests/**/*.py' | |
| - 'src/**/requirements.txt' | |
| - 'src/**/pyproject.toml' | |
| - 'src/**/pytest.ini' | |
| - 'src/**/conftest.py' | |
| - '.github/workflows/test.yml' | |
| permissions: | |
| contents: read | |
| actions: read | |
| pull-requests: write | |
| jobs: | |
| backend_tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| - name: Install Backend Dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r src/ContentProcessor/requirements.txt | |
| - name: Set PYTHONPATH | |
| run: echo "PYTHONPATH=$PWD" >> $GITHUB_ENV | |
| - name: Check if Backend Test Files Exist | |
| id: check_backend_tests | |
| run: | | |
| if [ -z "$(find src/tests/ContentProcessor -type f -name 'test_*.py')" ]; then | |
| echo "No backend test files found, skipping backend tests." | |
| echo "skip_backend_tests=true" >> $GITHUB_ENV | |
| else | |
| echo "Backend test files found, running tests." | |
| echo "skip_backend_tests=false" >> $GITHUB_ENV | |
| fi | |
| - name: Run Backend Tests with Coverage | |
| if: env.skip_backend_tests == 'false' | |
| run: | | |
| cd src/tests/ContentProcessor | |
| python -m pytest . --ignore=libs/test_models_and_entities.py --ignore=libs/test_utils_coverage_boost.py --ignore=libs/test_final_push_80.py --cov-config=.coveragerc --cov=../../ContentProcessor/src --cov-report=xml --cov-report=term --cov-fail-under=80 --junitxml=pytest.xml | |
| - name: Pytest Coverage Comment | |
| if: | | |
| always() && | |
| github.event_name == 'pull_request' && | |
| github.event.pull_request.head.repo.fork == false && | |
| env.skip_backend_tests == 'false' | |
| uses: MishaKav/pytest-coverage-comment@26f986d2599c288bb62f623d29c2da98609e9cd4 # v1.6.0 | |
| with: | |
| pytest-xml-coverage-path: src/tests/ContentProcessor/coverage.xml | |
| junitxml-path: src/tests/ContentProcessor/pytest.xml | |
| report-only-changed-files: true | |
| - name: Skip Backend Tests | |
| if: env.skip_backend_tests == 'true' | |
| run: echo "Skipping backend tests because no test files were found." | |
| api_tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| - name: Install API Dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r src/ContentProcessorAPI/requirements.txt | |
| pip install pytest==9.0.2 pytest-cov==7.0.0 pytest-mock==3.15.1 pytest-asyncio==1.3.0 | |
| - name: Set PYTHONPATH | |
| run: echo "PYTHONPATH=$PWD" >> $GITHUB_ENV | |
| - name: Check if API Test Files Exist | |
| id: check_api_tests | |
| run: | | |
| if [ -z "$(find src/tests/ContentProcessorAPI -type f -name 'test_*.py')" ]; then | |
| echo "No API test files found, skipping API tests." | |
| echo "skip_api_tests=true" >> $GITHUB_ENV | |
| else | |
| echo "API test files found, running tests." | |
| echo "skip_api_tests=false" >> $GITHUB_ENV | |
| fi | |
| - name: Run API Tests with Coverage | |
| if: env.skip_api_tests == 'false' | |
| run: | | |
| cd src/tests/ContentProcessorAPI | |
| python -m pytest --cov-config=.coveragerc --cov=../../ContentProcessorAPI/app --cov-report=xml --cov-report=term --cov-fail-under=80 | |
| - name: Skip API Tests | |
| if: env.skip_api_tests == 'true' | |
| run: echo "Skipping API tests because no test files were found." | |
| workflow_tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| - name: Install Workflow Dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e src/ContentProcessorWorkflow | |
| pip install pytest==9.0.2 pytest-cov==7.0.0 pytest-mock==3.15.1 pytest-asyncio==1.3.0 | |
| - name: Set PYTHONPATH | |
| run: echo "PYTHONPATH=$PWD" >> $GITHUB_ENV | |
| - name: Check if Workflow Test Files Exist | |
| id: check_workflow_tests | |
| run: | | |
| if [ -z "$(find src/tests/ContentProcessorWorkflow -type f -name 'test_*.py')" ]; then | |
| echo "No workflow test files found, skipping workflow tests." | |
| echo "skip_workflow_tests=true" >> $GITHUB_ENV | |
| else | |
| echo "Workflow test files found, running tests." | |
| echo "skip_workflow_tests=false" >> $GITHUB_ENV | |
| fi | |
| - name: Run Workflow Tests with Coverage | |
| if: env.skip_workflow_tests == 'false' | |
| run: | | |
| cd src/tests/ContentProcessorWorkflow | |
| python -m pytest utils/ libs/application/ libs/azure/ libs/base/ services/ -k "not test_service_scope_get_service_not_registered and not test_app_context_scoped_service_different_in_different_scopes and not test_get_azure_credential_with_all_env_vars and not test_app_context_create_instance_with_dependencies and not test_log_error_minimal_params and not test_get_async_bearer_token_provider and not test_prompt_template_rendering and not test_application_base_with_explicit_env_path and not test_app_context_async_scope_lifecycle and not test_app_context_async_singleton_lifecycle and not test_configure_logging_with_file_handler and not test_log_error_with_context_and_extra_data and not test_join_url_variations and not test_parse_retry_after_numeric and not test_parse_retry_after_invalid" --ignore=libs/agent_framework --cov-config=.coveragerc --cov=../../ContentProcessorWorkflow/src --cov-report=xml --cov-report=term --cov-fail-under=80 | |
| - name: Skip Workflow Tests | |
| if: env.skip_workflow_tests == 'true' | |
| run: echo "Skipping workflow tests because no test files were found." | |
| # frontend_tests: | |
| # runs-on: ubuntu-latest | |
| # | |
| # steps: | |
| # - name: Checkout code | |
| # uses: actions/checkout@v6 | |
| # | |
| # - name: Set up Node.js | |
| # uses: actions/setup-node@v3 | |
| # with: | |
| # node-version: "20" |