Skip to content

Commit 7e9c026

Browse files
committed
Trying again for CI - checkout had no depth
1 parent 23ee6db commit 7e9c026

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

.github/workflows/cert_test_checks.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ on:
1818
pull_request:
1919
paths:
2020
- "src/app/tests/suites/certification/**"
21+
permissions:
22+
contents: read
2123

2224
jobs:
2325
check-certification-tests:
@@ -30,6 +32,8 @@ jobs:
3032
steps:
3133
- name: Checkout
3234
uses: actions/checkout@v4
35+
with:
36+
fetch-depth: 0
3337
- name: Run checks
3438
run: |
3539
python3 scripts/tests/matter_yaml_linter.py

scripts/tests/matter_yaml_linter.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ def check_manual_steps():
5454
# Doing this on a test-by-test basis so the log message is more obvious
5555
bad_tests = set()
5656
for test in AllChipToolYamlTests(use_short_run_name=False):
57-
cmd = ['git', 'diff', 'HEAD^..HEAD', '--unified=0', '--', test.run_name]
58-
output = subprocess.check_output(cmd).decode().splitlines()
59-
user_prompt_added = [line for line in output if re.search('^\+.*UserPrompt.*', line)]
60-
user_prompt_removed = [line for line in output if re.search('^\-.*UserPrompt.*', line)]
57+
cmd = f'git diff HEAD^..HEAD --unified=0 -- {test.run_name}'
58+
output = subprocess.check_output(cmd, shell=True).decode().splitlines()
59+
user_prompt_added = [line for line in output if re.search(r'^\+.*UserPrompt.*', line)]
60+
user_prompt_removed = [line for line in output if re.search(r'^\-.*UserPrompt.*', line)]
6161
if len(user_prompt_added) > len(user_prompt_removed):
6262
print(f'Found YAML test with additional manual steps: {test.name}')
6363
if bad_tests:

0 commit comments

Comments
 (0)