|
1 | 1 | name: CI |
2 | 2 |
|
3 | 3 | on: |
4 | | - push: |
5 | | - branches: |
6 | | - - main |
7 | 4 | pull_request: |
8 | | - workflow_dispatch: |
| 5 | + push: |
| 6 | + branches: [main] |
9 | 7 |
|
10 | 8 | permissions: |
11 | 9 | contents: read |
| 10 | + security-events: write |
12 | 11 |
|
13 | 12 | jobs: |
14 | | - python: |
15 | | - name: Python checks |
| 13 | + quality: |
16 | 14 | runs-on: ubuntu-latest |
| 15 | + services: |
| 16 | + postgres: |
| 17 | + image: postgres:17-alpine |
| 18 | + env: |
| 19 | + POSTGRES_DB: pure_codeql |
| 20 | + POSTGRES_USER: pure_codeql |
| 21 | + POSTGRES_PASSWORD: pure_codeql |
| 22 | + ports: ["5432:5432"] |
| 23 | + options: >- |
| 24 | + --health-cmd "pg_isready -U pure_codeql" |
| 25 | + --health-interval 5s --health-timeout 3s --health-retries 20 |
| 26 | + redis: |
| 27 | + image: redis:8-alpine |
| 28 | + ports: ["6379:6379"] |
| 29 | + options: >- |
| 30 | + --health-cmd "redis-cli ping" |
| 31 | + --health-interval 5s --health-timeout 3s --health-retries 20 |
| 32 | + env: |
| 33 | + DATABASE_URL: postgresql+asyncpg://pure_codeql:pure_codeql@127.0.0.1:5432/pure_codeql |
| 34 | + REDIS_URL: redis://127.0.0.1:6379/0 |
17 | 35 | steps: |
18 | | - - name: Checkout |
19 | | - uses: actions/checkout@v5 |
20 | | - |
21 | | - - name: Install uv |
22 | | - uses: astral-sh/setup-uv@v8.1.0 |
| 36 | + - uses: actions/checkout@v4 |
| 37 | + - uses: astral-sh/setup-uv@v6 |
23 | 38 | with: |
24 | 39 | enable-cache: true |
25 | | - |
26 | | - - name: Set up Python |
27 | | - uses: actions/setup-python@v6 |
| 40 | + - uses: actions/setup-python@v5 |
28 | 41 | with: |
29 | | - python-version-file: .python-version |
30 | | - |
31 | | - - name: Verify lockfile |
32 | | - run: uv lock --check |
33 | | - |
34 | | - - name: Install dependencies |
35 | | - run: uv sync --locked |
36 | | - |
37 | | - - name: Lint (ruff) |
38 | | - run: uvx ruff check pure_auto_codeql Analyze.py config.py test |
39 | | - |
40 | | - - name: Run tests |
41 | | - run: uv run pytest -q |
42 | | - |
43 | | - - name: Compile Python modules |
44 | | - run: uv run python -m compileall -q Analyze.py pure_auto_codeql |
45 | | - |
46 | | - |
47 | | - - name: Check diff whitespace |
48 | | - run: git diff --check |
| 42 | + python-version: "3.13" |
| 43 | + - run: uv sync --frozen --dev |
| 44 | + - run: uv run ruff check pure_auto_codeql test migrations |
| 45 | + - run: uv run pyright |
| 46 | + - run: uv run python -m compileall -q Analyze.py pure_auto_codeql migrations |
| 47 | + - run: uv run alembic upgrade head |
| 48 | + - run: uv run pytest -m "not real_codeql and not real_llm" --cov --cov-report=xml |
| 49 | + - run: uv run pip-audit |
| 50 | + - run: npm ci && npm run build && npm test && npm audit --audit-level=moderate |
| 51 | + working-directory: tools/mcp_ripgrep |
49 | 52 |
|
50 | | - mcp-ripgrep: |
51 | | - name: MCP ripgrep checks |
| 53 | + codeql-golden: |
52 | 54 | runs-on: ubuntu-latest |
53 | | - defaults: |
54 | | - run: |
55 | | - working-directory: tools/mcp_ripgrep |
56 | 55 | steps: |
57 | | - - name: Checkout |
58 | | - uses: actions/checkout@v5 |
59 | | - |
60 | | - - name: Set up Node.js |
61 | | - uses: actions/setup-node@v6 |
| 56 | + - uses: actions/checkout@v4 |
| 57 | + - uses: astral-sh/setup-uv@v6 |
| 58 | + - uses: actions/setup-python@v5 |
62 | 59 | with: |
63 | | - node-version: "22" |
64 | | - cache: npm |
65 | | - cache-dependency-path: tools/mcp_ripgrep/package-lock.json |
66 | | - |
67 | | - - name: Install dependencies |
68 | | - run: npm ci |
69 | | - |
70 | | - - name: Audit dependencies |
71 | | - run: npm audit --audit-level=high |
72 | | - |
73 | | - - name: Build |
74 | | - run: npm run build |
| 60 | + python-version: "3.13" |
| 61 | + - uses: github/codeql-action/init@v4 |
| 62 | + with: |
| 63 | + languages: java-kotlin, python, c-cpp |
| 64 | + - run: uv sync --frozen --dev |
| 65 | + - run: uv run pytest -m real_codeql -q |
0 commit comments