chore(docker): Update docker services #883
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: Python Lint CI | |
| # トリガー条件: pushされたとき、またはpython-audio-analyzerディレクトリが変更されたとき | |
| on: | |
| push: | |
| paths: | |
| - 'apps/python-audio-analyzer/**' | |
| - '.github/workflows/python-lint.yml' | |
| pull_request: | |
| paths: | |
| - 'apps/python-audio-analyzer/**' | |
| - '.github/workflows/python-lint.yml' | |
| jobs: | |
| lint-and-test: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: apps/python-audio-analyzer | |
| steps: | |
| # 1. リポジトリをチェックアウト | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| # 2. Python をセットアップ | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.13' | |
| # 3. Python依存関係のキャッシュ | |
| - name: Cache Python dependencies | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pip- | |
| # 4. 依存パッケージのインストール | |
| - name: Install Python dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install -e .[dev] | |
| # 5. Ruff Lint チェック | |
| - name: Run Ruff Lint | |
| run: python -m ruff check . | |
| # 6. Ruff Format チェック | |
| - name: Run Ruff Format Check | |
| run: python -m ruff format . --check | |
| # 7. MyPy 型チェック (オプション) | |
| - name: Run MyPy Type Check | |
| run: python -m mypy . | |
| continue-on-error: true # 型チェックエラーがあってもワークフローを継続 | |
| # 8. テスト実行 (将来的にテストが追加された場合) | |
| - name: Run Tests | |
| run: python -m pytest | |
| continue-on-error: true # テストがない場合でも継続 | |
| # 9. Python OpenAPI Spec が最新であることを検証 | |
| - name: Verify Python OpenAPI spec | |
| run: | | |
| python scripts/export_openapi.py | |
| git diff --exit-code -- ../../packages/shared-types/openapi/audio-analyzer.json | |
| build-docker: | |
| runs-on: ubuntu-latest | |
| needs: lint-and-test | |
| defaults: | |
| run: | |
| working-directory: apps/python-audio-analyzer | |
| steps: | |
| # 1. リポジトリをチェックアウト | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| # 2. Docker Buildx セットアップ | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v4 | |
| # 3. Docker イメージビルド | |
| - name: Build Docker image | |
| run: docker build -t sonory-audio-analyzer . |