Skip to content

Commit c316b7a

Browse files
committed
feat(ci): implement comprehensive CI/CD for frontend, backend, and extension
1 parent d261b8c commit c316b7a

3 files changed

Lines changed: 64 additions & 7 deletions

File tree

.github/workflows/frontend.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Frontend CI
2+
3+
on:
4+
push:
5+
branches: [ "master", "main" ]
6+
paths:
7+
- "apps/frontend/**"
8+
pull_request:
9+
branches: [ "master", "main" ]
10+
paths:
11+
- "apps/frontend/**"
12+
13+
jobs:
14+
build:
15+
name: Lint and Build
16+
runs-on: ubuntu-latest
17+
defaults:
18+
run:
19+
working-directory: apps/frontend
20+
21+
steps:
22+
- name: Checkout repository
23+
uses: actions/checkout@v4
24+
25+
- name: Setup Node.js
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: "20"
29+
cache: "npm"
30+
cache-dependency-path: apps/frontend/package-lock.json
31+
32+
- name: Install dependencies
33+
run: npm ci
34+
35+
- name: Run Lint
36+
run: npm run lint
37+
38+
- name: Build
39+
run: npm run build

.github/workflows/rust.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,19 @@ jobs:
2828
- name: Cache cargo
2929
uses: Swatinem/rust-cache@v2
3030

31-
- name: Check Formatting (cargo fmt)
31+
- name: Check Formatting (CLI)
3232
run: cargo fmt --all -- --check
3333

34-
- name: Run Clippy (cargo clippy)
34+
- name: Run Clippy (CLI)
3535
run: cargo clippy --all-targets --all-features -- -D warnings
3636

37-
- name: Run Unit Tests (cargo test)
38-
run: cargo test --verbose
37+
- name: Check Formatting (Backend)
38+
working-directory: apps/backend
39+
run: cargo fmt --all -- --check
40+
41+
- name: Run Clippy (Backend)
42+
working-directory: apps/backend
43+
run: cargo clippy --all-targets --all-features -- -D warnings
3944

4045
test-matrix:
4146
name: Tests (${{ matrix.os }})
@@ -56,5 +61,9 @@ jobs:
5661
- name: Cache cargo
5762
uses: Swatinem/rust-cache@v2
5863

59-
- name: Run Unit Tests (cargo test)
64+
- name: Run CLI Tests
65+
run: cargo test --all-features --verbose
66+
67+
- name: Run Backend Tests
68+
working-directory: apps/backend
6069
run: cargo test --all-features --verbose

.github/workflows/vscode-extension.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,15 @@ permissions:
55

66
on:
77
push:
8+
branches: [ "master", "main" ]
9+
paths:
10+
- "editors/vscode/**"
811
tags:
912
- "v*"
13+
pull_request:
14+
branches: [ "master", "main" ]
15+
paths:
16+
- "editors/vscode/**"
1017
workflow_dispatch:
1118
inputs:
1219
publish_marketplaces:
@@ -141,7 +148,8 @@ jobs:
141148
needs: package
142149
runs-on: ubuntu-latest
143150
if: >
144-
(github.event_name == 'push' || inputs.publish_marketplaces == true)
151+
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v'))
152+
|| (github.event_name == 'workflow_dispatch' && inputs.publish_marketplaces == true)
145153
&& secrets.VSCE_PAT != ''
146154
defaults:
147155
run:
@@ -176,7 +184,8 @@ jobs:
176184
needs: package
177185
runs-on: ubuntu-latest
178186
if: >
179-
(github.event_name == 'push' || inputs.publish_marketplaces == true)
187+
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v'))
188+
|| (github.event_name == 'workflow_dispatch' && inputs.publish_marketplaces == true)
180189
&& secrets.OVSX_PAT != ''
181190
defaults:
182191
run:

0 commit comments

Comments
 (0)