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
10 changes: 6 additions & 4 deletions .github/workflows/stats-pr.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Open Pull Request with updated stats file
name: Open Pull Request with updated stats report
on:
workflow_run:
workflows: ["Test Learning Path"]
Expand All @@ -11,24 +11,26 @@ jobs:
stats-pr:
runs-on: arm-linux-runner
steps:
- name: Checkout code
- name: Checkout main branch
uses: actions/checkout@v2
with:
ref: main
- name: Download a single artifact
- name: Download stats report as artifact
uses: actions/download-artifact@v4
with:
# Run ID of the workflow that uploaded the artifact
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ github.token }}
- name: Move stats file
# Unpack the artifact and move the stats file to the correct location
run: |
mv stats_current_test_info/stats_current_test_info.yml data/stats_current_test_info.yml
rm -rf stats_current_test_info
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
if: success()
with:
commit-message: update stats_current_test_info.yml
commit-message: Update stats_current_test_info.yml
title: Update stats_current_test_info.yml
body: |
Update test result file with recent run
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/test-lp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,20 @@ jobs:
- name: Install dependencies
if: steps.changed-markdown-files.outputs.any_changed == 'true'
run: pip install -r tools/requirements.txt
- name: Run test suite for all changed files
- name: Run test suite for all changed .md files
id: run-suite
if: steps.changed-markdown-files.outputs.any_changed == 'true'
# Run the test suite
run: |
set -o pipefail; ./.github/workflows/test_lp.sh ${{ steps.changed-markdown-files.outputs.all_changed_files }} 2>&1 | tee test-lp-output.txt
set -o pipefail; ./tools/test_lp.sh ${{ steps.changed-markdown-files.outputs.all_changed_files }} 2>&1 | tee test-lp-output.txt
- name: Parse test suite errors
id: test-suite-state
if: success()
# Catch any missed errors if running multiple tests
run: |
cat test-lp-output.txt | grep -q 'Tests failed in test suite' && echo "TEST_SUITE_ERRORS=true" >> "$GITHUB_ENV" \
|| echo "TEST_SUITE_ERRORS=false" >> "$GITHUB_ENV"
- name: Test condition
- name: Check for errors in test suite
if: env.TEST_SUITE_ERRORS == 'true' && success()
run: |
echo "Test failures detected in test suite, check the output in earlier steps"
Expand All @@ -42,10 +42,10 @@ jobs:
run: |
cat test-lp-output.txt | grep -q 'maintenance is turned off' && echo "MAINTENANCE=off" >> "$GITHUB_ENV" \
|| echo "MAINTENANCE=on" >> "$GITHUB_ENV"
- name: Test condition
- name: Check if maintenance is turned off
if: env.MAINTENANCE == 'off' && success()
# Skip opening a PR if tests have not been run
run: echo "Maintenance is turned off for one or more files"
# Only upload artifact if maintenance is on
- name: Upload stats artifact
uses: actions/upload-artifact@v4
if: success() && env.MAINTENANCE == 'on'
Expand Down
2 changes: 1 addition & 1 deletion tools/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ def check(json_file, start, stop, md_article):
{ethos_u65} NON_INTERACTIVE=1 --name test_fvp flebeau/arm-corstone-300-fvp"
)
else:
logging.debug(f"Type '{test_type}' not supported for testing. Contact the maintainers if you think this is a mistake.")
logging.info(f"Type '{test_type}' not supported for testing. Contact the maintainers if you think this is a mistake.")
bar(skipped=True)
continue

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_lp.sh → tools/test_lp.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Run by test-lp.yml GitHub Action
ALL_CHANGED_FILES=$@

# Install dependencies and run tests,
Expand All @@ -18,7 +19,6 @@ done
CONTENT_PATHS_UNIQUE=($(printf "%s\n" "${CONTENT_PATHS[@]}" | sort -u))
echo "Unique content paths: ${CONTENT_PATHS_UNIQUE[*]}"
# Run the tests

for file in ${CONTENT_PATHS_UNIQUE[*]}; do
tools/maintenance.py -i ${file} --stats-report
done