-
Notifications
You must be signed in to change notification settings - Fork 0
Draft: Hardware Tests in CI #12
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
base: main
Are you sure you want to change the base?
Conversation
LCOV of commit
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds a new GitHub Actions job for running hardware tests on STM32 Nucleo boards and updates the development container to include necessary Python tooling.
- Introduce
hardware-test-stm32-nucleo-l4r5zi
job in CI workflow. - Install Python 3, pip, setuptools, and wheel in the devcontainer for hardware test scripts.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
.github/workflows/ci.yml | Add hardware-test job that flashes and queries STM32 targets. |
.devcontainer/Dockerfile | Include python3 and related tooling for test scripts. |
Comments suppressed due to low confidence (1)
.github/workflows/ci.yml:135
- The new hardware-test job appears nested under the previous job's steps due to its indentation. De-indent it to the same level as other jobs under
jobs:
so it registers correctly.
hardware-test-stm32-nucleo-l4r5zi:
name: Hardware test for the STM32 Nucleo L4R5ZI | ||
# needs: [build-stm32-nucleo-l4r5zi] | ||
runs-on: stm32l4r5zi | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Run hardware test | ||
# See https://github.com/OsirisRTOS/hardware-ci for more information | ||
run: | | ||
SERIAL_ID="$(board_info serial stm32l4r5zi)" | ||
echo "Working with chip $SERIAL_ID" | ||
|
||
st-flash --serial "$SERIAL_ID" reset | ||
|
||
board_info print --serial "$SERIAL_ID" --flash-size |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 1 month ago
To fix the issue, we will add a permissions
block to the hardware-test-stm32-nucleo-l4r5zi
job. Since this job appears to only run hardware tests and does not interact with the repository contents or other GitHub features, the minimal required permission is contents: read
. This ensures that the job has only the permissions it needs to function correctly.
-
Copy modified lines R139-R140
@@ -138,2 +138,4 @@ | ||
runs-on: stm32l4r5zi | ||
permissions: | ||
contents: read | ||
steps: |
This adds, together with the https://github.com/OsirisRTOS/hardware-ci repo, a way to run hardware tests in CI.
Basically, one sets up the other repo on a server that has one or multiple STM chips attached, and makes them available in CI.
Then you can create a GitHub Action job:
We can run on a specific type of chip via the
runs-on
label, and get a specific chip serial ID via theboard_info serial stm32l4r5zi
command.board_info
also supports printing details about a specific chip, like flash size, page size etc.This PR should be merged after #8