Skip to content

Refactor Docker environment and unit test workflow#554

Merged
chenyushuo merged 3 commits into
agentscope-ai:mainfrom
pan-x-c:feature/docker-based-unittest
May 26, 2026
Merged

Refactor Docker environment and unit test workflow#554
chenyushuo merged 3 commits into
agentscope-ai:mainfrom
pan-x-c:feature/docker-based-unittest

Conversation

@pan-x-c
Copy link
Copy Markdown
Collaborator

@pan-x-c pan-x-c commented May 26, 2026

Description

This pull request introduces a major refactor of the Trinity-RFT Docker-based test environment to improve maintainability, configurability, and usability for both local development and CI workflows. The changes include moving and renaming Docker-related files, introducing new helper scripts, improving environment configuration, and updating CI workflows to use the new structure. The Docker setup is now more modular, with clear documentation and machine-specific configuration, making it easier to run and debug tests in a consistent environment.

Docker environment restructuring and configuration:

  • Moved and renamed the main Dockerfile from scripts/docker/Dockerfile.uv to docker/Dockerfile, and updated all references accordingly. [1] [2] [3]
  • Added docker/env.example as a template for machine-specific Docker environment variables, and require users to copy it to docker/env before use. Updated the Docker Compose file to use these environment variables for GPU assignment, image name, mount points, and endpoints. [1] [2] [3]
  • Added a comprehensive docker/README.md explaining hardware requirements, configuration, and usage of the new helper scripts for starting, checking, running tests, and stopping the environment.

Helper scripts for Docker test workflow:

  • Introduced new scripts in the docker/ directory: start.sh, status.sh, run.sh, stop.sh, and a shared common.sh for environment loading and Docker Compose invocation. These scripts standardize and simplify starting the environment, running tests, checking Ray cluster health, and cleanup. [1] [2] [3] [4] [5]

CI workflow updates:

  • Updated .github/workflows/unittest.yaml to use the new Docker structure and helper scripts for environment preparation, test execution, status checking, and cleanup. Improved the logic for selecting test directories and running tests based on changed files or user input. [1] [2] [3]
  • Updated .github/workflows/docker.yaml to use the new Dockerfile location.

Improvements to Docker Compose and environment variables:

  • Refactored docker/docker-compose.yaml to use environment variables for all machine-specific settings, removed hardcoded values, and made the setup more flexible for different hardware environments.

Documentation and usability:

  • Added clear instructions and error handling for missing or invalid configuration, and ensured all scripts provide helpful messages for setup or troubleshooting. [1] [2] [3]

These changes collectively make the Docker-based test environment more robust, portable, and user-friendly, both for CI and for local development.

Checklist

Please check the following items before code is ready to be reviewed.

  • Code has passed all tests
  • Docstrings have been added/updated in Google Style
  • Documentation has been updated
  • Code is ready for review

@chenyushuo chenyushuo merged commit 9438bc8 into agentscope-ai:main May 26, 2026
2 checks passed
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