|
| 1 | +name: CI |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [main, develop] |
| 6 | + pull_request: |
| 7 | + branches: [main] |
| 8 | + |
| 9 | +jobs: |
| 10 | + test: |
| 11 | + runs-on: ubuntu-latest |
| 12 | + strategy: |
| 13 | + matrix: |
| 14 | + python-version: ['3.10', '3.11', '3.12', '3.13'] |
| 15 | + |
| 16 | + steps: |
| 17 | + - uses: actions/checkout@v4 |
| 18 | + |
| 19 | + - name: Set up Python ${{ matrix.python-version }} |
| 20 | + uses: actions/setup-python@v5 |
| 21 | + with: |
| 22 | + python-version: ${{ matrix.python-version }} |
| 23 | + |
| 24 | + - name: Install dependencies |
| 25 | + run: | |
| 26 | + python -m pip install --upgrade pip |
| 27 | + pip install -e ".[dev,llm,security,semantic,graph]" |
| 28 | +
|
| 29 | + - name: Run tests |
| 30 | + run: | |
| 31 | + pytest tests/ -v --cov=vallm --cov-report=xml --cov-report=term |
| 32 | +
|
| 33 | + - name: Upload coverage |
| 34 | + uses: codecov/codecov-action@v4 |
| 35 | + with: |
| 36 | + files: ./coverage.xml |
| 37 | + fail_ci_if_error: false |
| 38 | + |
| 39 | + lint: |
| 40 | + runs-on: ubuntu-latest |
| 41 | + |
| 42 | + steps: |
| 43 | + - uses: actions/checkout@v4 |
| 44 | + |
| 45 | + - name: Set up Python |
| 46 | + uses: actions/setup-python@v5 |
| 47 | + with: |
| 48 | + python-version: '3.13' |
| 49 | + |
| 50 | + - name: Install dependencies |
| 51 | + run: | |
| 52 | + python -m pip install --upgrade pip |
| 53 | + pip install ruff mypy |
| 54 | + pip install -e ".[dev]" |
| 55 | +
|
| 56 | + - name: Run ruff |
| 57 | + run: | |
| 58 | + ruff check src/vallm tests/ |
| 59 | + ruff format --check src/vallm tests/ |
| 60 | +
|
| 61 | + - name: Run mypy |
| 62 | + run: | |
| 63 | + mypy src/vallm --ignore-missing-imports |
| 64 | +
|
| 65 | + validate-examples: |
| 66 | + runs-on: ubuntu-latest |
| 67 | + |
| 68 | + steps: |
| 69 | + - uses: actions/checkout@v4 |
| 70 | + |
| 71 | + - name: Set up Python |
| 72 | + uses: actions/setup-python@v5 |
| 73 | + with: |
| 74 | + python-version: '3.13' |
| 75 | + |
| 76 | + - name: Install dependencies |
| 77 | + run: | |
| 78 | + python -m pip install --upgrade pip |
| 79 | + pip install -e ".[dev]" |
| 80 | +
|
| 81 | + - name: Run batch validation |
| 82 | + run: | |
| 83 | + vallm batch ./src ./examples --recursive --include "*.py" |
| 84 | +
|
| 85 | + - name: Run examples (no LLM) |
| 86 | + run: | |
| 87 | + cd examples |
| 88 | + python 01_basic_validation/main.py |
| 89 | + python 02_ast_comparison/main.py |
| 90 | + python 03_security_check/main.py |
| 91 | + python 04_graph_analysis/main.py |
| 92 | + python 06_multilang_validation/main.py |
| 93 | + python 07_multi_language/main.py |
0 commit comments