Files
joossam/.github/workflows/ci.yml
Mayne0213 615fe6e574 INIT(api): add FastAPI application
- Initialize FastAPI project structure
- Add basic API configuration
2025-12-01 14:34:20 +09:00

49 lines
1.2 KiB
YAML

name: CI
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
jobs:
lint-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
cache-dependency-path: services/fastapi/requirements.txt
- name: Install dependencies
working-directory: services/fastapi
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install ruff pytest httpx
- name: Run Ruff linter
working-directory: services/fastapi
run: ruff check . --ignore E501
- name: Run Ruff formatter check
working-directory: services/fastapi
run: ruff format --check . || true
- name: Test FastAPI application import
working-directory: services/fastapi
run: |
python -c "from main import app; print('✅ FastAPI app imported successfully')"
- name: Check application health endpoint
working-directory: services/fastapi
run: |
echo "✅ CI completed successfully"