Add GPU local storage benchmark #1718
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: 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: Install kwokctl | |
if: always() | |
run: | | |
curl -LO https://github.com/kubernetes-sigs/kwok/releases/latest/download/kwokctl-linux-amd64 | |
chmod +x kwokctl-linux-amd64 | |
sudo mv kwokctl-linux-amd64 /usr/local/bin/kwokctl | |
- name: Create KWOK cluster | |
if: always() | |
run: kwokctl create cluster --name kwok-test | |
- name: Run Python Tests with Coverage | |
if: always() | |
working-directory: ${{ env.PYTHON_MODULES_DIR }} | |
# TODO: Update Validation to check 70% coverage for each test file | |
run: pytest --cov=. --cov-report=term-missing --cov-fail-under=70 | |
- name: Delete KWOK cluster | |
if: always() | |
run: kwokctl delete cluster --name kwok-test |