Update omnia.sh tag for omnia_core image #3305
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: Pylint | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| - staging | |
| - release_1.7.1 | |
| - pub/q1_dev | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.11"] | |
| env: | |
| PYLINT_THRESHOLD: 8 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v3 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install ansible pylint kubernetes prettytable requests passlib | |
| - name: Get changed Python files (excluding deleted) | |
| id: changed-files | |
| run: | | |
| git fetch origin ${{ github.base_ref }} | |
| CHANGED=$(git diff --name-only --diff-filter=d origin/${{ github.base_ref }} HEAD -- '*.py' || true) | |
| FILES="" | |
| for f in $CHANGED; do | |
| if [ -f "$f" ]; then | |
| FILES="$FILES $f" | |
| fi | |
| done | |
| FILES=$(echo "$FILES" | xargs) # Trim extra spaces | |
| echo "Filtered files: $FILES" | |
| echo "files=$FILES" >> "$GITHUB_OUTPUT" | |
| - name: Run pylint on changed files | |
| if: steps.changed-files.outputs.files != '' | |
| run: | | |
| echo "Running pylint on: ${{ steps.changed-files.outputs.files }}" | |
| # Filter out files from the excluded directory | |
| FILES=$(echo "${{ steps.changed-files.outputs.files }}" | tr ' ' '\n' | grep -v '^discovery/roles/telemetry/files/nersc-ldms-aggr/' | xargs) | |
| if [ -n "$FILES" ]; then | |
| pylint $FILES --fail-under=${PYLINT_THRESHOLD} | |
| else | |
| echo "No files to lint after filtering." | |
| fi |