Conversation
|
@aparcar the thing |
| - target: x86 | ||
| subtarget: 64 | ||
| use_qemu: true | ||
| qemu_target: x86 |
There was a problem hiding this comment.
could we add armsr/armv8 here, too?
There was a problem hiding this comment.
extra 40 minutes for each run but yes
| - name: Run test with QEMU | ||
| if: inputs.use_qemu == true | ||
| run: | | ||
| export LG_QEMU_BIN=$(which qemu-system-${{ inputs.qemu_target }}) |
There was a problem hiding this comment.
I found out you can drop the which wrapping, it was a path issue on my local device.
| run: | | ||
| export LG_QEMU_BIN=$(which qemu-system-${{ inputs.qemu_target }}) | ||
|
|
||
| poetry run pytest --lg-env target_${{ inputs.target }}-${{ inputs.subtarget }}.yaml |
There was a problem hiding this comment.
I renamed the target to qemu.yaml and instead added the --target argument. Also please checkout --firmware to specify the file, which should make things more elegant.
e4d1be9 to
92d33d6
Compare
7ef03b6 to
0a3f3c9
Compare
94e64ba to
c7ec823
Compare
Add support for uploading compiled images if build_full is triggered. This is in preparation for testing the images in QEMU if supported. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Introduce reusable test-image workflow. Currently only QEMU is supported. This assume it's run after an artifact is uploaded by other workflow. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Add additional job to enable testing with QEMU using the new reusable_test-image workflow. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Some images are compressed with .gz format, extract them to correctly use them. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds a reusable GitHub Actions workflow to test built OpenWrt images (currently via QEMU) and wires it into the existing packages workflow by uploading images from the build and downloading them for test execution.
Changes:
- Introduce
reusable_test-image.ymlto download build artifacts and run pytest-based QEMU tests. - Extend
reusable_build.ymlwith anupload_imagesinput to publish compiled images as artifacts. - Add a QEMU test matrix job to
packages.ymlconsuming the reusable test workflow.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| .github/workflows/reusable_test-image.yml | New reusable workflow to install deps, download image artifacts, and run QEMU-based tests. |
| .github/workflows/reusable_build.yml | Adds optional image artifact upload to support downstream image testing. |
| .github/workflows/packages.yml | Enables image upload in build job and introduces QEMU test matrix calling the reusable test workflow. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| strategy: | ||
| fail-fast: False | ||
| matrix: |
| sudo apt install python3-pip | ||
|
|
||
| - name: Install QEMU dependency | ||
| if: inputs.use_qemu == true | ||
| run: | | ||
| sudo apt install qemu-system-${{ inputs.qemu_target }} |
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| repository: aparcar/openwrt-tests |
| # gunzip return 2 for warning hence we need to reset | ||
| if [ -f "${{ inputs.image }}.gz" ]; then | ||
| gunzip -q ${{ inputs.image }}.gz || true |
| run: | | ||
| # gunzip return 2 for warning hence we need to reset | ||
| if [ -f "${{ inputs.image }}.gz" ]; then | ||
| gunzip -q ${{ inputs.image }}.gz || true |
| poetry run pytest \ | ||
| --lg-env tests/qemu.yaml \ | ||
| --target ${{ inputs.target }}-${{ inputs.subtarget }} \ | ||
| --firmware "$(pwd)"/${{ inputs.image }} |
Failed checksIssues marked with an ❌ are failing checks. Commit 9862474
Commit a87dbf0
For more details, see the full job log. Something broken? Consider providing feedback. |
Attach QEMU test to packages workflow. This is still WIP as some test still needs some better handling.
The reusable workflow expect an artifact to be downloaded and tested. Currently only QEMU is supported, but it's expected that sometime in the future this is expanded also to labgrid and expanded also to other workflow... (maybe restrict this to push event?)