Merge pull request #14 from 2026-KUSITMS-GLIT/feat/#7-tagging-v1 #43
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: CI | |
| on: | |
| pull_request: | |
| branches: [main] | |
| push: | |
| branches: [main] | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| lint-type-test: | |
| name: Lint / Type / Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| version: "0.5.11" | |
| enable-cache: true | |
| cache-dependency-glob: | | |
| pyproject.toml | |
| uv.lock | |
| - name: Set up Python 3.12 | |
| run: uv python install 3.12 | |
| - name: Install dependencies (dev) | |
| run: uv sync --dev | |
| - name: Ruff — lint | |
| run: uv run ruff check . | |
| - name: Ruff — format check | |
| run: uv run ruff format --check . | |
| - name: Mypy | |
| run: uv run mypy app | |
| - name: Pytest (skip if no tests) | |
| run: | | |
| if [ -d tests ] && ls tests/test_*.py tests/**/test_*.py 2>/dev/null | grep -q .; then | |
| uv run pytest | |
| else | |
| echo "tests/ 비어있음 → pytest skip" | |
| fi | |
| docker-build: | |
| name: Docker build (smoke) | |
| runs-on: ubuntu-latest | |
| needs: lint-type-test | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: docker/setup-buildx-action@v3 | |
| - name: Build image (no push) | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| push: false | |
| load: true | |
| tags: glit-ai:ci-${{ github.sha }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| - name: Smoke — import app inside image | |
| run: | | |
| docker run --rm --entrypoint python glit-ai:ci-${{ github.sha }} \ | |
| -c "import app.main; print('ok', app.main.app.title)" |