Skip to content

removed test file

removed test file #27

Workflow file for this run

name: Lint Code
on:
push:
branches:
- main
- develop
- feature/linter
pull_request:
branches:
- main
- develop
jobs:
lint:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.12.4'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pylint
- name: Find Changed Files
shell: pwsh
run: |
$CHANGED_FILES = git diff --name-only HEAD~1 HEAD | Where-Object { $_ -like "*.py" }
Write-Host "Changed Python files:"
Write-Host $CHANGED_FILES
echo "changed_files=$CHANGED_FILES" >> $env:GITHUB_ENV
- name: Running Pylint
shell: pwsh
run: |
$failed = $false
$files = $env:changed_files -split "`n"
foreach ($file in $files) {
pylint --fail-under=8.5 $file
if ($LASTEXITCODE -ne 0) {
$failed = $true
}
}
if ($failed) {
exit 1
}