asingh38
initial commit: clean project structure
f7e925b
Raw History Blame Contribute Delete
1.13 kB
name: CI
on:
push:
branches: ["main", "dev"]
pull_request:
branches: ["main"]
jobs:
lint-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: ${{ runner.os }}-pip-
- name: Install dependencies
run: |
pip install --upgrade pip
pip install -r requirements.txt
pip install flake8 pytest
- name: Lint
run: |
flake8 app.py backend/ --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 app.py backend/ --count --max-line-length=120 --exit-zero --statistics
- name: Test
env:
OPENAI_API_KEY: "test-key-not-real"
USERS: "testuser:testpass"
run: |
pytest tests/ -v --tb=short || echo "No tests yet — skipping."