fix(docker): 빌드 실패하는 COPY .github 제거 #80
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: tests | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python 3.12 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install \ | |
| fastapi==0.115.12 \ | |
| uvicorn==0.34.0 \ | |
| "psycopg[binary]==3.2.6" \ | |
| ldap3==2.9.1 \ | |
| httpx==0.28.1 \ | |
| reportlab==4.2.5 \ | |
| ruff | |
| - name: Lint (ruff — critical errors) | |
| run: ruff check --select E9,F63,F7,F82 src tests | |
| - name: Unit tests | |
| env: | |
| PYTHONPATH: src | |
| # Postgres-backed tests self-skip when MORI_DATABASE_URL is unset. | |
| run: python -m unittest discover -s tests -p "test_*.py" -v | |
| catalog: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python 3.12 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install PyYAML | |
| run: pip install pyyaml | |
| - name: Validate control catalog (schema + cross-references) | |
| run: python controls/validate.py | |
| - name: Verify runtime JSON is in sync with YAML | |
| # Rebuild the committed artifact; fail if it differs (someone edited YAML | |
| # without re-running controls/_build_catalog_json.py). | |
| run: | | |
| python controls/_build_catalog_json.py | |
| git diff --exit-code -- src/mori_soc/data/controls_catalog.json \ | |
| || { echo "::error::controls_catalog.json is stale — run 'python controls/_build_catalog_json.py' and commit"; exit 1; } |