Skip to content

ci: add integration tests for cryptpilot-convert#71

Open
imlk0 wants to merge 10 commits intomasterfrom
more-ci
Open

ci: add integration tests for cryptpilot-convert#71
imlk0 wants to merge 10 commits intomasterfrom
more-ci

Conversation

@imlk0
Copy link
Copy Markdown
Collaborator

@imlk0 imlk0 commented Jan 22, 2026

Summary

  • Add integration test script for cryptpilot-convert disk conversion
  • Tests 4 combinations: UKI/GRUB × encrypted/no-encryption modes
  • Includes cryptpilot-enhance hardening step before conversion
  • Uses matrix strategy in CI for parallel test execution

Test plan

  • CI runs all 4 test cases in parallel
  • Each case validates: enhance → convert → verify output structure

🤖 Generated with [Qoder][https://qoder.com]

@imlk0 imlk0 force-pushed the more-ci branch 3 times, most recently from 755755d to fb095f6 Compare April 2, 2026 06:35
imlk0 added 9 commits April 2, 2026 20:14
Add integration test script that validates disk conversion workflow:
- Tests 4 combinations: UKI/GRUB × encrypted/no-encryption modes
- Includes cryptpilot-enhance step before conversion
- Uses matrix strategy in CI for parallel test execution
- Supports local testing with --input option for custom images

🤖 Generated with [Qoder][https://qoder.com]
- Install make in test container
- Simplify RPM install to only cryptpilot-fde
- Remove unused test wrapper functions
- Add shellcheck directive for trap-registered cleanup function

🤖 Generated with [Qoder][https://qoder.com]
GitHub Actions runners don't have nbd kernel module.
Skip test with success when nbd is not available.

🤖 Generated with [Qoder][https://qoder.com]
- Move nbd module loading to host runner before container starts
- Use manual docker run instead of container action for better control
- Remove graceful skip logic, now expects nbd to be available

🤖 Generated with [Qoder][https://qoder.com]
objcopy failed with 'No space left on device' when creating UKI.
Use --tmpfs with 10GB limit to provide sufficient space.

🤖 Generated with [Qoder][https://qoder.com]
10GB insufficient for rootfs extraction (5GB image).
Increase to 20GB to ensure adequate space.

🤖 Generated with [Qoder][https://qoder.com]
Add workflow to build and publish test images to GHCR for faster CI:
- Create build-test-image.yml: manually triggered workflow with url/tag inputs
- Create test-image.Dockerfile: minimal Dockerfile to package qcow2 images
- Modify build-rpm.yml test-convert job to pull test image from ghcr.io
  instead of downloading from external URL on each run

This change significantly speeds up CI by:
- Pre-downloading test qcow2 images into GHCR containers
- Extracting qcow2 from container images in CI (much faster than wget)
- Passing INPUT_IMAGE to make run-convert-test-case for custom image path

The test image tag is configurable via TEST_IMAGE_TAG env variable.

Signed-off-by: Kun Lai <laikun@linux.alibaba.com>
Add /bin/true as placeholder command when creating container from
scratch-based test image. The docker create command requires a command
argument even for images without a shell, otherwise it fails with
'no command specified' error.
Update artifact download configuration to use correct artifact name:
- Change from rpm-packages-x86_64 to build-output-x86_64
- Update download-artifact action from v4 to v8 for consistency
- Add merge-multiple: false to prevent unwanted merging behavior

Signed-off-by: Kun Lai <laikun@linux.alibaba.com>
@shankailun-aliyun
Copy link
Copy Markdown

@imlk0 ,您好,您的请求已接收,请耐心等待结果。

@shankailun-aliyun
Copy link
Copy Markdown

@imlk0 ,您好,您提交的 PR 将进行以下镜像构建:

序号 应用名 Dockerfile 路径 TAGS 操作
1 cryptpilot-crypt Dockerfile.crypt 0.6.0、latest 新增TAG
2 cryptpilot-fde Dockerfile.fde 0.6.0、latest 新增TAG
3 cryptpilot-verity Dockerfile.verity 0.6.0、latest 新增TAG

如已确认,请回复 /build 进行构建。

@shankailun-aliyun
Copy link
Copy Markdown

@imlk0 ,您好,您的请求已接收,请耐心等待结果。

@shankailun-aliyun
Copy link
Copy Markdown

@imlk0 ,您好,未检测到有镜像需要构建,如需重新检测请评论 /start

Fix missing --package rpm specification in CI workflow and add QEMU
boot testing to validate converted images.

Changes:
- build-rpm.yml: Export RPM path via GITHUB_OUTPUT for test step
- Makefile: Pass CRYPTPILOT_FDE_RPM to test-convert.sh via --rpm flag
- test-convert.sh: Add test_qemu_boot() function to verify images
  boot correctly using QEMU container (ghcr.io/qemus/qemu)
  - Tests for login prompt (success) or emergency shell (failure)
  - 2-minute timeout for boot completion
  - Full boot log output for debugging

Signed-off-by: Kun Lai <laikun@linux.alibaba.com>
@shankailun-aliyun
Copy link
Copy Markdown

@imlk0 ,您好,您的请求已接收,请耐心等待结果。

@shankailun-aliyun
Copy link
Copy Markdown

@imlk0 ,您好,未检测到有镜像需要构建,如需重新检测请评论 /start

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants