CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
63 lines
1.7 KiB
YAML
63 lines
1.7 KiB
YAML
# Run pylint over the Python files
|
|
|
|
name: "hipFile pylint"
|
|
|
|
on:
|
|
push:
|
|
branches: [develop]
|
|
paths:
|
|
- 'projects/hipfile/**/*.py'
|
|
- 'projects/hipfile/**/ais-check'
|
|
- '.github/workflows/hipfile-pylint.yml'
|
|
pull_request:
|
|
paths:
|
|
- 'projects/hipfile/**/*.py'
|
|
- 'projects/hipfile/**/ais-check'
|
|
- '.github/workflows/hipfile-pylint.yml'
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
hipfile-pylint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
with:
|
|
sparse-checkout: |
|
|
projects/hipfile
|
|
.github/workflows
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
|
with:
|
|
python-version: "3.12"
|
|
cache: 'pip'
|
|
|
|
# requirements.in from the docs is needed to lint conf.py
|
|
- name: Install Python packages
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
python -m pip install pylint
|
|
python -m pip install black
|
|
python -m pip install pytest
|
|
pip install -r projects/hipfile/docs/sphinx/requirements.in
|
|
|
|
- name: Lint all Python files
|
|
run: |
|
|
cd projects/hipfile
|
|
FILES=$(find . -type f \( -name "*.py" -o -name "ais-check" \))
|
|
if [ -z "$FILES" ]; then
|
|
echo "No Python files found!"
|
|
exit 1
|
|
fi
|
|
echo "Linting the following files:"
|
|
echo "$FILES"
|
|
python -m black --check --diff $FILES
|
|
python -m pylint $FILES
|