mirror of
https://github.com/LTTLabsOSS/markbench-tests.git
synced 2026-01-08 21:48:00 -05:00
update workflow (#67)
* update workflow * update file path * fix action error * fix step id * revert test change * test * test * fix newline * run poetry install * fix error * install poetry * test * revert poetry install * test calling pylint as module * test calling pylint as module
This commit is contained in:
16
.github/workflows/linting.yml
vendored
16
.github/workflows/linting.yml
vendored
@@ -12,20 +12,32 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: streetsidesoftware/cspell-action@v3
|
- uses: streetsidesoftware/cspell-action@v3
|
||||||
|
with:
|
||||||
|
files: |
|
||||||
|
**/*.py
|
||||||
|
**/*.md
|
||||||
|
|
||||||
exec_pylint:
|
exec_pylint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
- name: Get Python changed files
|
||||||
|
id: changed-files-python
|
||||||
|
uses: tj-actions/changed-files@v39
|
||||||
with:
|
with:
|
||||||
fetch-depth: 2
|
files: |
|
||||||
|
*.py
|
||||||
|
**/*.py
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v3
|
uses: actions/setup-python@v3
|
||||||
with:
|
with:
|
||||||
python-version: "3.10"
|
python-version: "3.10"
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
|
if: steps.changed-files-python.outputs.any_changed == 'true'
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip install pylint
|
pip install pylint
|
||||||
- name: Analysing the code with pylint
|
- name: Analysing the code with pylint
|
||||||
|
if: steps.changed-files-python.outputs.any_changed == 'true'
|
||||||
run: |
|
run: |
|
||||||
pylint $(git diff --name-only -r HEAD^1 HEAD -- '*.py')
|
python -m pylint ${{ steps.changed-files-python.outputs.all_changed_files }}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ from utils import (
|
|||||||
copy_benchmark,
|
copy_benchmark,
|
||||||
STEAM_GAME_ID
|
STEAM_GAME_ID
|
||||||
)
|
)
|
||||||
|
# test
|
||||||
|
|
||||||
sys.path.insert(1, os.path.join(sys.path[0], '..'))
|
sys.path.insert(1, os.path.join(sys.path[0], '..'))
|
||||||
|
|
||||||
|
|||||||
@@ -12,3 +12,4 @@ def remove_files(paths: list[str]) -> None:
|
|||||||
logging.info("Removed file: %s", path)
|
logging.info("Removed file: %s", path)
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
logging.info("File already removed: %s", path)
|
logging.info("File already removed: %s", path)
|
||||||
|
#test
|
||||||
|
|||||||
@@ -25,3 +25,4 @@ def format_resolution(width: int, height: int) -> str:
|
|||||||
def seconds_to_milliseconds(seconds: float | int) -> int:
|
def seconds_to_milliseconds(seconds: float | int) -> int:
|
||||||
"""Convert seconds to milliseconds"""
|
"""Convert seconds to milliseconds"""
|
||||||
return round((seconds * 1000))
|
return round((seconds * 1000))
|
||||||
|
# test
|
||||||
|
|||||||
@@ -7,3 +7,4 @@ def terminate_processes(*process_names: str) -> None:
|
|||||||
for process in psutil.process_iter():
|
for process in psutil.process_iter():
|
||||||
if name.lower() in process.name().lower():
|
if name.lower() in process.name().lower():
|
||||||
process.terminate()
|
process.terminate()
|
||||||
|
# test
|
||||||
|
|||||||
Reference in New Issue
Block a user