Skip to content

Commit

Permalink
Trying again for CI - checkout had no depth
Browse files Browse the repository at this point in the history
  • Loading branch information
cecille committed Sep 10, 2024
1 parent 23ee6db commit 7e9c026
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/cert_test_checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ on:
pull_request:
paths:
- "src/app/tests/suites/certification/**"
permissions:
contents: read

jobs:
check-certification-tests:
Expand All @@ -30,6 +32,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run checks
run: |
python3 scripts/tests/matter_yaml_linter.py
8 changes: 4 additions & 4 deletions scripts/tests/matter_yaml_linter.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ def check_manual_steps():
# Doing this on a test-by-test basis so the log message is more obvious
bad_tests = set()
for test in AllChipToolYamlTests(use_short_run_name=False):
cmd = ['git', 'diff', 'HEAD^..HEAD', '--unified=0', '--', test.run_name]
output = subprocess.check_output(cmd).decode().splitlines()
user_prompt_added = [line for line in output if re.search('^\+.*UserPrompt.*', line)]
user_prompt_removed = [line for line in output if re.search('^\-.*UserPrompt.*', line)]
cmd = f'git diff HEAD^..HEAD --unified=0 -- {test.run_name}'
output = subprocess.check_output(cmd, shell=True).decode().splitlines()
user_prompt_added = [line for line in output if re.search(r'^\+.*UserPrompt.*', line)]
user_prompt_removed = [line for line in output if re.search(r'^\-.*UserPrompt.*', line)]
if len(user_prompt_added) > len(user_prompt_removed):
print(f'Found YAML test with additional manual steps: {test.name}')
if bad_tests:
Expand Down

0 comments on commit 7e9c026

Please sign in to comment.