Skip to content

fix: refactor autoscale for MS test case #2669

fix: refactor autoscale for MS test case

fix: refactor autoscale for MS test case #2669

name: Python Validation
on:
pull_request:
paths:
- 'modules/python/**'
env:
PYTHON_MODULES_DIR: modules/python
jobs:
python-validation:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Python Version Check
run: python --version
- name: Install Python Dependencies
working-directory: ${{ env.PYTHON_MODULES_DIR }}
run: pip install -r requirements.txt
- name: Fetch all branches
run: git fetch --prune --unshallow
- name: Run Pylint on changed files
id: changed-files
run: |
# Get list of changed files
file_changes=$(git diff --name-only --diff-filter=d origin/main HEAD -- '*.py')
echo "Files changed: $file_changes"
if [ -z "$file_changes" ]; then
echo "No Python files were changed."
else
pylint $file_changes
fi
- name: Run Python Tests with Coverage
if: always()
working-directory: ${{ env.PYTHON_MODULES_DIR }}
# TODO: Update Validation to check 80% coverage for each test file
run: pytest --cov=. --cov-report=term-missing --cov-fail-under=80