Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 3 additions & 11 deletions .github/workflows/python-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,8 @@ on:
- '**.py'
pull_request:
branches: [ "main" ]
paths:
- '**.py'
workflow_dispatch:
# inputs:
# branch_name:
# description: 'Test against to branch'
# required: true
# default: 'main'


permissions:
contents: read
Expand All @@ -33,12 +27,10 @@ jobs:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python3 -m pip install --upgrade pip
pip install .
pip install -r requirements-dev.txt
- name: Lint with flake8
run: flake8 --max-line-length=120
- name: Run tests and collect coverage
- name: Collect coverage
run: |
coverage run --source=tests,clang_tools -m pytest
coverage report -m
Expand Down
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
coverage
flake8
pre-commit
pytest
7 changes: 2 additions & 5 deletions tests/test_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from clang_tools.install import clang_tools_binary_url


@pytest.mark.parametrize(('version', 'expected'), (('12', True), ('100', False)))
@pytest.mark.parametrize(('version', 'expected'), (('', True), ('100', False)))
def test_clang_tools_exist(version, expected):
assert clang_format_exist(version) == expected
assert clang_tidy_exist(version) == expected
Expand All @@ -18,7 +18,4 @@ def test_clang_tools_binary_url():
os = check_install_os()
for tool in tools:
ret = clang_tools_binary_url(tool, version)
if os == 'windows':
assert(f"{tool}-{version}_{os}-amd64.exe" in ret)
else:
assert(f"{tool}-{version}_{os}-amd64" in ret)
assert(f"{tool}-{version}_{os}-amd64" in ret)
2 changes: 0 additions & 2 deletions tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,3 @@ def test_main_install(argv, called, response):
if called and not response:
with pytest.raises(SystemExit):
main()
else:
main()