name: Test and Lint on: push: branches: - main pull_request: branches: - main workflow_dispatch: jobs: test: runs-on: ubuntu-latest steps: - name: Install system dependencies shell: sh run: | apk add --no-cache git python3 py3-pip gcc musl-dev libpq-dev python3-dev - name: Checkout code shell: sh run: | git clone http://gitea.gitea.svc.cluster.local/${{ gitea.repository }}.git . git checkout ${{ gitea.sha }} - name: Install Python dependencies shell: sh run: | pip3 install --break-system-packages -r requirements.txt ruff - name: Run ruff linter shell: sh run: | ruff check SPARC/ tests/ - name: Install Node.js and frontend dependencies shell: sh run: | apk add --no-cache nodejs npm cd frontend && npm ci - name: Run TypeScript type check shell: sh run: | cd frontend && npx tsc --noEmit - name: Run pytest shell: sh env: DATABASE_URL: "sqlite://" API_KEY: "test-key" OPENROUTER_API_KEY: "test-key" JWT_SECRET: "test-secret-for-ci" APP_ENV: "development" run: | python3 -m pytest tests/ -v --tb=short -x