Skip to content

fix: resolve remaining 100 CodeQL quality issues (#28) #114

fix: resolve remaining 100 CodeQL quality issues (#28)

fix: resolve remaining 100 CodeQL quality issues (#28) #114

Workflow file for this run

name: Tests
on:
pull_request:
branches: [main]
push:
branches: [main]
jobs:
# ── Job 3: CodeQL analysis ─────────────────────────────────────────────────
codeql:
name: CodeQL analysis
runs-on: ubuntu-latest
permissions:
security-events: write
strategy:
matrix:
language: [python, javascript-typescript]
steps:
- uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
config-file: .github/codeql/codeql-config.yml
- uses: github/codeql-action/autobuild@v3
- name: Perform CodeQL analysis
uses: github/codeql-action/analyze@v3
# ── Job 1: full native test suite ──────────────────────────────────────────
# Downloads Typesense, creates a venv, runs all tests directly on the runner.
native:
name: Native tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install Python dependencies
run: |
python3 -m venv ~/.local/indexserver-venv
~/.local/indexserver-venv/bin/pip install -q -r requirements-dev.txt
- name: Write config.json
run: echo '{"api_key":"ci-test-key","port":8108,"roots":{}}' > config.json
- name: Run tests
run: node run_tests.mjs --linux --print-logs
- name: Upload logs on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: native-logs
path: /tmp/codesearch-run-*
if-no-files-found: ignore
# ── Job 2: Docker E2E ───────────────────────────────────────────────────────
# Builds the codesearch-mcp image, starts a container with sample/root1 and
# sample/root2 mounted, waits for indexing, then runs pytest inside the
# container and VS Code extension pipeline tests from the host.
docker-e2e:
name: Docker E2E tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20"
- name: Run Docker E2E tests
run: node run_tests.mjs --docker --print-logs
- name: Upload logs on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: docker-e2e-logs
path: /tmp/codesearch-run-*
if-no-files-found: ignore