Improve Docker test execution in CI workflow#3
Merged
Conversation
Refactor the Docker-based pytest execution to use create/start/stop lifecycle instead of run --rm. This approach provides better control and cleanup, and uses docker cp to copy tests into the container rather than mounting volumes. Changes: - Add TEST_CONTAINER_NAME env variable with unique run ID - Use docker create/start/stop pattern instead of docker run - Copy tests with docker cp instead of read-only volume mounts - Add always() cleanup step to ensure container removal - Switch to python -m pytest for better module resolution 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Add linux/amd64 and linux/arm64 platform support to the build-test job to match the configuration used in build-release and build-develop jobs. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Changed from multi-platform (linux/amd64,linux/arm64) to linux/amd64 only for the build-test job because the docker exporter doesn't support loading manifest lists locally. Since this job needs to run containers for testing, it must use load: true, which is incompatible with multi-platform builds. The build-release and build-develop jobs still build for both platforms. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Added an empty entrypoint to the Docker container creation step in the CI workflow to ensure proper execution of pytest. This change enhances the control over the container's behavior during testing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
docker create/start/stoplifecycle instead ofdocker run --rmTEST_CONTAINER_NAMEwith GitHub run IDdocker cpfor copying test files into containeralways()condition to ensure container removalpython -m pytestfor better module resolutionBenefits
Test plan
🤖 Generated with Claude Code