-
Notifications
You must be signed in to change notification settings - Fork 18
109 lines (102 loc) · 3.37 KB
/
ci.yml
File metadata and controls
109 lines (102 loc) · 3.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
name: CI — OpenCode Ecosystem
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
workflow_dispatch:
jobs:
lint:
name: Lint Gate
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Install Python linter
run: pip install ruff
- name: Ruff check (Python)
run: ruff check . --exclude node_modules,.venv,__pycache__
- name: Install Node linter
run: npm install -g eslint
- name: ESLint check (TypeScript)
run: eslint plugins/ command/ --ext .ts
continue-on-error: true
unit-tests:
name: Unit Test Gate
needs: lint
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install Python deps
run: pip install -r requirements-dev.txt
continue-on-error: true
- name: Run core unit tests
run: pytest tests/core/ -v --tb=short
continue-on-error: true
- name: Run nexus unit tests
run: pytest tests/nexus/ -v --tb=short
continue-on-error: true
- name: Run editais-br unit tests
run: pytest editais-br/tests/unit/ -v --tb=short
continue-on-error: true
spec-coverage:
name: Spec Coverage Gate
needs: unit-tests
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Check spec coverage
run: python scripts/spec_coverage.py --threshold 80
integration:
name: Integration Test Gate
needs: spec-coverage
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install Python deps
run: pip install -r requirements-dev.txt
continue-on-error: true
- name: Run integration tests
run: pytest tests/integration/ -v --tb=long -x
continue-on-error: true
health-check:
name: Health Check Gate
needs: integration
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Run health check
run: python scripts/health_check.py
continue-on-error: true
report:
name: CI Report
needs: [lint, unit-tests, spec-coverage, integration, health-check]
runs-on: windows-latest
if: always()
steps:
- name: Generate CI report
run: |
echo "## CI Pipeline Report — OpenCode Ecosystem" >> $env:GITHUB_STEP_SUMMARY
echo "" >> $env:GITHUB_STEP_SUMMARY
echo "| Gate | Status |" >> $env:GITHUB_STEP_SUMMARY
echo "|------|--------|" >> $env:GITHUB_STEP_SUMMARY
echo "| Lint | ${{ needs.lint.result }} |" >> $env:GITHUB_STEP_SUMMARY
echo "| Unit Tests | ${{ needs.unit-tests.result }} |" >> $env:GITHUB_STEP_SUMMARY
echo "| Spec Coverage | ${{ needs.spec-coverage.result }} |" >> $env:GITHUB_STEP_SUMMARY
echo "| Integration | ${{ needs.integration.result }} |" >> $env:GITHUB_STEP_SUMMARY
echo "| Health Check | ${{ needs.health-check.result }} |" >> $env:GITHUB_STEP_SUMMARY