Skip to content

Commit 8b0ac1f

Browse files
authored
feat(milestone-7): complete Phase 2-5 - CI/CD, Editor Integration, Docs Verification, Release Automation (#8)
## Phase 2: CI/CD Pipeline - Add .github/workflows/ci.yml with Ruby matrix testing (3.0-3.3) - Add RuboCop lint check with .rubocop.yml configuration - Add Codecov integration for test coverage - Add VSCode and JetBrains plugin build/verify steps - Add docs verification CI step - Create .github/workflows/release.yml for simultaneous deployment - Remove legacy wasm-publish.yml (now integrated into release.yml) ## Phase 3: Editor Plugin Integration - Add editors/VERSION as single source of truth (v0.2.0) - Create scripts/sync-editor-versions.sh for version synchronization - Setup VSCode test framework with @vscode/test-electron + Mocha - Write VSCode plugin tests (extension.test.ts) - Setup JetBrains test framework with JUnit 5 - Write JetBrains plugin tests (TRubyFileTypeTest, TRubySettingsTest) - Create editors/CONTRIBUTING.md with plugin contribution guide ## Phase 4: Documentation Verification - Create DocsExampleExtractor for Markdown code block extraction - Create DocsExampleVerifier for compile/typecheck validation - Create DocsBadgeGenerator for coverage badges (JSON, SVG) - Create Rakefile with docs:verify, docs:badge, docs:list tasks ## Phase 5: Release Automation - Create COMMIT_CONVENTION.md with Conventional Commits guide - Create .releaserc.yml for semantic-release configuration - Configure automatic CHANGELOG generation
1 parent 07b9565 commit 8b0ac1f

25 files changed

+2035
-90
lines changed

.github/workflows/ci.yml

Lines changed: 188 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,188 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main, develop]
6+
pull_request:
7+
branches: [main, develop]
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
# Ruby 컴파일러 테스트
15+
test:
16+
name: Ruby ${{ matrix.ruby }} Test
17+
runs-on: ubuntu-latest
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
ruby: ['3.0', '3.1', '3.2', '3.3']
22+
23+
steps:
24+
- uses: actions/checkout@v4
25+
26+
- name: Setup Ruby ${{ matrix.ruby }}
27+
uses: ruby/setup-ruby@v1
28+
with:
29+
ruby-version: ${{ matrix.ruby }}
30+
bundler-cache: true
31+
32+
- name: Run tests
33+
run: bundle exec rspec --format progress --format RspecJunitFormatter --out tmp/rspec_results.xml
34+
continue-on-error: false
35+
36+
- name: Upload test results
37+
uses: actions/upload-artifact@v4
38+
if: always()
39+
with:
40+
name: test-results-ruby-${{ matrix.ruby }}
41+
path: tmp/rspec_results.xml
42+
43+
# RuboCop 린트 검사
44+
lint:
45+
name: RuboCop Lint
46+
runs-on: ubuntu-latest
47+
48+
steps:
49+
- uses: actions/checkout@v4
50+
51+
- name: Setup Ruby
52+
uses: ruby/setup-ruby@v1
53+
with:
54+
ruby-version: '3.3'
55+
bundler-cache: true
56+
57+
- name: Run RuboCop
58+
run: bundle exec rubocop --format github
59+
60+
# 테스트 커버리지
61+
coverage:
62+
name: Test Coverage
63+
runs-on: ubuntu-latest
64+
65+
steps:
66+
- uses: actions/checkout@v4
67+
68+
- name: Setup Ruby
69+
uses: ruby/setup-ruby@v1
70+
with:
71+
ruby-version: '3.3'
72+
bundler-cache: true
73+
74+
- name: Run tests with coverage
75+
run: |
76+
COVERAGE=true bundle exec rspec
77+
env:
78+
COVERAGE: true
79+
80+
- name: Upload coverage to Codecov
81+
uses: codecov/codecov-action@v4
82+
with:
83+
token: ${{ secrets.CODECOV_TOKEN }}
84+
files: ./coverage/coverage.xml
85+
fail_ci_if_error: false
86+
verbose: true
87+
88+
# VSCode 플러그인 빌드
89+
vscode:
90+
name: VSCode Plugin
91+
runs-on: ubuntu-latest
92+
93+
defaults:
94+
run:
95+
working-directory: editors/vscode
96+
97+
steps:
98+
- uses: actions/checkout@v4
99+
100+
- name: Setup Node.js
101+
uses: actions/setup-node@v4
102+
with:
103+
node-version: '20'
104+
cache: 'npm'
105+
cache-dependency-path: editors/vscode/package-lock.json
106+
107+
- name: Install dependencies
108+
run: npm ci
109+
110+
- name: Lint
111+
run: npm run lint
112+
113+
- name: Compile
114+
run: npm run compile
115+
116+
# JetBrains 플러그인 빌드
117+
jetbrains:
118+
name: JetBrains Plugin
119+
runs-on: ubuntu-latest
120+
121+
defaults:
122+
run:
123+
working-directory: editors/jetbrains
124+
125+
steps:
126+
- uses: actions/checkout@v4
127+
128+
- name: Setup Java
129+
uses: actions/setup-java@v4
130+
with:
131+
distribution: 'temurin'
132+
java-version: '21'
133+
134+
- name: Setup Gradle
135+
uses: gradle/actions/setup-gradle@v4
136+
137+
- name: Validate Gradle wrapper
138+
uses: gradle/actions/wrapper-validation@v4
139+
140+
- name: Build plugin
141+
run: ./gradlew buildPlugin
142+
143+
- name: Verify plugin
144+
run: ./gradlew verifyPlugin
145+
146+
- name: Upload plugin artifact
147+
uses: actions/upload-artifact@v4
148+
with:
149+
name: jetbrains-plugin
150+
path: editors/jetbrains/build/distributions/*.zip
151+
152+
# 문서 예제 검증
153+
docs-verify:
154+
name: Docs Verification
155+
runs-on: ubuntu-latest
156+
continue-on-error: true # Don't fail CI if docs have issues
157+
158+
steps:
159+
- uses: actions/checkout@v4
160+
161+
- name: Setup Ruby
162+
uses: ruby/setup-ruby@v1
163+
with:
164+
ruby-version: '3.3'
165+
bundler-cache: true
166+
167+
- name: Verify documentation examples
168+
run: bundle exec rake docs:verify
169+
170+
# 전체 상태 체크
171+
ci-status:
172+
name: CI Status
173+
runs-on: ubuntu-latest
174+
needs: [test, lint, coverage, vscode, jetbrains]
175+
if: always()
176+
177+
steps:
178+
- name: Check CI status
179+
run: |
180+
if [[ "${{ needs.test.result }}" == "failure" ]] || \
181+
[[ "${{ needs.lint.result }}" == "failure" ]] || \
182+
[[ "${{ needs.coverage.result }}" == "failure" ]] || \
183+
[[ "${{ needs.vscode.result }}" == "failure" ]] || \
184+
[[ "${{ needs.jetbrains.result }}" == "failure" ]]; then
185+
echo "CI failed"
186+
exit 1
187+
fi
188+
echo "CI passed"

0 commit comments

Comments
 (0)