Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: on_target: add pkk test #96

Merged
merged 1 commit into from
Mar 6, 2025
Merged

tests: on_target: add pkk test #96

merged 1 commit into from
Mar 6, 2025

Conversation

DematteisGiacomo
Copy link
Collaborator

PPK test with readme badge and html plot.

PPK test with readme badge and html plot.

Signed-off-by: Giacomo Dematteis <giacomo.dematteis@nordicsemi.no>
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Core Changes

  • The main purpose of this PR is to introduce a new PPK (Power Profiler Kit) test for the asset-tracker-template project. This includes adding a new test script test_power.py which measures power consumption and generates reports in CSV and HTML formats.
  • The GitHub Actions workflows have been updated to include the new PPK test. The target-test.yml workflow now supports running tests on multiple devices, including a new device ppk_thingy91x which only runs when the 'slow' marker is specified.
  • Permissions for the test job in build-and-target-test.yml and target-test.yml have been modified to allow writing to contents.

⚠️ Concerns

  • The change in permissions from contents: read to contents: write in the GitHub Actions workflows could potentially allow unintended modifications to the repository contents if not properly secured.
  1. Verdict:
    • Comment: The changes introduce a useful new test and enhance the CI/CD workflows, but the modification of permissions to allow writing to contents should be reviewed to ensure it does not introduce security risks.

Code review performed by OPENAI - gpt-4o.

@@ -22,7 +22,7 @@ jobs:
test:
permissions:
actions: read
contents: read
contents: write
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing permissions from contents: read to contents: write can introduce security risks if not properly managed. Ensure that the workflow is secure and that only trusted code can execute with these permissions.


# Self-hosted runner is labeled according to the device it is linked with
runs-on: ${{ matrix.device }}
name: Target Test - ${{ matrix.device }}

permissions:
actions: read
contents: read
contents: write
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to the build-and-target-test.yml, changing permissions from contents: read to contents: write requires careful consideration. Verify that this change is necessary and that appropriate security measures are in place.

@DematteisGiacomo DematteisGiacomo merged commit 144ac98 into main Mar 6, 2025
1 check passed
@DematteisGiacomo DematteisGiacomo deleted the ppk_test branch March 6, 2025 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant