Docker Fix #2
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
| name: Docker Build and Test | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build Docker image | |
| run: | | |
| docker compose build subtitle-generator | |
| - name: Create test directories | |
| run: | | |
| mkdir -p data/{input,output,config,logs,temp,jobs} | |
| - name: Create mock service account | |
| run: | | |
| echo '{"type":"service_account","project_id":"test"}' > data/config/service-account.json | |
| - name: Test Docker container startup | |
| run: | | |
| docker compose run --rm subtitle-generator \ | |
| python -c "from src.health_checker import quick_health_check; print('Health check passed')" | |
| - name: Test help command | |
| run: | | |
| docker compose run --rm subtitle-generator \ | |
| python main.py --help | |
| - name: Test configuration validation | |
| run: | | |
| docker compose run --rm subtitle-generator \ | |
| python -c "from src.config_manager import ConfigManager; cm = ConfigManager(); print('Config validation passed')" |