diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index b67c8e2..80dd8f9 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -12,20 +12,32 @@ jobs: steps: - uses: actions/checkout@v3 - uses: streetsidesoftware/cspell-action@v3 + with: + files: | + **/*.py + **/*.md + exec_pylint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + - name: Get Python changed files + id: changed-files-python + uses: tj-actions/changed-files@v39 with: - fetch-depth: 2 + files: | + *.py + **/*.py - name: Set up Python uses: actions/setup-python@v3 with: python-version: "3.10" - name: Install dependencies + if: steps.changed-files-python.outputs.any_changed == 'true' run: | python -m pip install --upgrade pip pip install pylint - name: Analysing the code with pylint + if: steps.changed-files-python.outputs.any_changed == 'true' run: | - pylint $(git diff --name-only -r HEAD^1 HEAD -- '*.py') \ No newline at end of file + python -m pylint ${{ steps.changed-files-python.outputs.all_changed_files }} diff --git a/csgo/csgo.py b/csgo/csgo.py index 3312e87..c089481 100644 --- a/csgo/csgo.py +++ b/csgo/csgo.py @@ -13,6 +13,7 @@ from utils import ( copy_benchmark, STEAM_GAME_ID ) +# test sys.path.insert(1, os.path.join(sys.path[0], '..')) diff --git a/harness_utils/misc.py b/harness_utils/misc.py index 5c5bd0c..9c814c6 100644 --- a/harness_utils/misc.py +++ b/harness_utils/misc.py @@ -12,3 +12,4 @@ def remove_files(paths: list[str]) -> None: logging.info("Removed file: %s", path) except FileNotFoundError: logging.info("File already removed: %s", path) +#test diff --git a/harness_utils/output.py b/harness_utils/output.py index 875751d..7865fba 100644 --- a/harness_utils/output.py +++ b/harness_utils/output.py @@ -25,3 +25,4 @@ def format_resolution(width: int, height: int) -> str: def seconds_to_milliseconds(seconds: float | int) -> int: """Convert seconds to milliseconds""" return round((seconds * 1000)) +# test diff --git a/harness_utils/process.py b/harness_utils/process.py index a4e5700..82e0ae7 100644 --- a/harness_utils/process.py +++ b/harness_utils/process.py @@ -7,3 +7,4 @@ def terminate_processes(*process_names: str) -> None: for process in psutil.process_iter(): if name.lower() in process.name().lower(): process.terminate() +# test