Skip to content

Delete api directory #19

Delete api directory

Delete api directory #19

Workflow file for this run

name: Python CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
lint:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python with uv
uses: astral-sh/setup-uv@v2
with:
uv-version: latest
- name: Create virtual environment
run: uv venv
# Optional: Add .venv to environment so uv activates it automatically
- name: Add venv to environment
run: echo "$PWD/.venv/bin" >> $GITHUB_PATH
- name: Install linters
run: uv pip install black flake8
- name: Check code formatting with Black
run: |
echo "🔍 Checking code formats..."
uv run black main.py api/ platforms/ scripts/ .
- name: Lint with flake8
run: |
uv run flake8 api/ platforms/ main.py scripts/ \
--max-line-length=88 \
--ignore=E203,W503,E501 \
--exclude=__pycache__,*.egg-info,build,dist,.git,.venv,venv,env,site-packages
test:
runs-on: ubuntu-latest
needs: lint
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python with uv
uses: astral-sh/setup-uv@v2
with:
uv-version: latest
- name: Create virtual environment
run: uv venv
- name: Add venv to environment
run: echo "$PWD/.venv/bin" >> $GITHUB_PATH
- name: Install dependencies
run: |
uv pip install -r requirements.txt
uv pip install pytest
- name: Verify main module imports
run: |
uv run python -c "import main; print('✅ Main module imported successfully')"
- name: Setup environment file
run: |
if [ ! -f .env ]; then
cp .env.example .env
echo "✅ Created .env from .env.example"
else
echo "ℹ️ .env already exists, skipping copy"
fi
- name: Run tests
run: |
uv run pytest -v --tb=short
continue-on-error: true