|
| 1 | +# Harness Engineering CI |
| 2 | +# Multi-language template: Choose based on project tech stack, remove inapplicable parts |
| 3 | + |
| 4 | +name: CI |
| 5 | + |
| 6 | +on: |
| 7 | + push: |
| 8 | + branches: [main] |
| 9 | + pull_request: |
| 10 | + branches: [main] |
| 11 | + |
| 12 | +jobs: |
| 13 | + # ============================================ |
| 14 | + # Node.js project - Remove this block if not applicable |
| 15 | + # ============================================ |
| 16 | + nodejs: |
| 17 | + runs-on: ubuntu-latest |
| 18 | + if: ${{ false }} # Change to true to enable |
| 19 | + strategy: |
| 20 | + matrix: |
| 21 | + node-version: [18.x, 20.x] |
| 22 | + steps: |
| 23 | + - uses: actions/checkout@v4 |
| 24 | + |
| 25 | + - name: Setup Node.js ${{ matrix.node-version }} |
| 26 | + uses: actions/setup-node@v4 |
| 27 | + with: |
| 28 | + node-version: ${{ matrix.node-version }} |
| 29 | + cache: 'npm' # or 'pnpm' |
| 30 | + |
| 31 | + # If using pnpm, uncomment the following steps |
| 32 | + # - uses: pnpm/action-setup@v2 |
| 33 | + # with: |
| 34 | + # version: 8 |
| 35 | + |
| 36 | + - name: Install dependencies |
| 37 | + run: npm ci # or pnpm install --frozen-lockfile |
| 38 | + |
| 39 | + - name: Lint |
| 40 | + run: npm run lint # Modify to actual command |
| 41 | + |
| 42 | + - name: Test |
| 43 | + run: npm test # Modify to actual command |
| 44 | + |
| 45 | + - name: Build |
| 46 | + run: npm run build # Modify to actual command |
| 47 | + |
| 48 | + # ============================================ |
| 49 | + # Python project - Remove this block if not applicable |
| 50 | + # ============================================ |
| 51 | + python: |
| 52 | + runs-on: ubuntu-latest |
| 53 | + if: ${{ false }} # Change to true to enable |
| 54 | + strategy: |
| 55 | + matrix: |
| 56 | + python-version: ['3.10', '3.11', '3.12'] |
| 57 | + steps: |
| 58 | + - uses: actions/checkout@v4 |
| 59 | + |
| 60 | + - name: Setup Python ${{ matrix.python-version }} |
| 61 | + uses: actions/setup-python@v5 |
| 62 | + with: |
| 63 | + python-version: ${{ matrix.python-version }} |
| 64 | + cache: 'pip' # or 'pipenv', 'poetry' |
| 65 | + |
| 66 | + # If using poetry, uncomment the following steps |
| 67 | + # - name: Install poetry |
| 68 | + # uses: abatilo/actions-poetry@v2 |
| 69 | + # with: |
| 70 | + # poetry-version: 1.7 |
| 71 | + |
| 72 | + - name: Install dependencies |
| 73 | + run: | |
| 74 | + python -m pip install --upgrade pip |
| 75 | + pip install -r requirements.txt # or poetry install |
| 76 | + |
| 77 | + - name: Lint |
| 78 | + run: | |
| 79 | + pip install ruff mypy |
| 80 | + ruff check . |
| 81 | + mypy . # Optional |
| 82 | + |
| 83 | + - name: Test |
| 84 | + run: pytest # Modify to actual command |
| 85 | + |
| 86 | + - name: Build |
| 87 | + run: | |
| 88 | + pip install build |
| 89 | + python -m build # Optional |
| 90 | +
|
| 91 | + # ============================================ |
| 92 | + # Harness check - Check documentation sync |
| 93 | + # ============================================ |
| 94 | + harness-check: |
| 95 | + runs-on: ubuntu-latest |
| 96 | + steps: |
| 97 | + - uses: actions/checkout@v4 |
| 98 | + |
| 99 | + - name: Check harness files exist |
| 100 | + run: | |
| 101 | + echo "Checking harness infrastructure..." |
| 102 | + test -f AGENTS.md || echo "::warning::AGENTS.md missing" |
| 103 | + test -f ARCHITECTURE.md || echo "::warning::ARCHITECTURE.md missing" |
| 104 | + test -f docs/DESIGN.md || echo "::warning::docs/DESIGN.md missing" |
| 105 | + test -f docs/SECURITY.md || echo "::warning::docs/SECURITY.md missing" |
| 106 | + test -f docs/QUALITY_SCORE.md || echo "::warning::docs/QUALITY_SCORE.md missing" |
| 107 | + echo "Harness check complete." |
0 commit comments