-
Notifications
You must be signed in to change notification settings - Fork 1
140 lines (115 loc) · 3.78 KB
/
ci.yml
File metadata and controls
140 lines (115 loc) · 3.78 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: package-lock.json
- name: Install npm dependencies
run: nix develop --command just web install
- name: Build web-ui
run: nix develop --command just web build
- name: Cache cargo
uses: Swatinem/rust-cache@v2
with:
# Cache all crates including heavy native deps (cozo, rocksdb)
cache-all-crates: true
# Share cache between check and e2e jobs
shared-key: "rust-cache"
# Cache both main workspace and iggy submodule
workspaces: |
. -> target
vendor/iggy -> target
- name: Format check
run: nix develop --command just quality fmt-check
- name: Clippy
# Build all targets so test binaries are ready for next step
run: nix develop --command just quality clippy
- name: Test
run: nix develop --command just tests run
e2e:
runs-on: ubuntu-latest
needs: check # Run after check job passes
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: package-lock.json
- name: Install npm dependencies
run: nix develop --command just web install
- name: Build web-ui
run: nix develop --command just web build
- name: Cache cargo
uses: Swatinem/rust-cache@v2
with:
cache-all-crates: true
shared-key: "rust-cache"
# Cache both main workspace and iggy submodule
workspaces: |
. -> target
vendor/iggy -> target
- name: Build debug binary
# Debug build is much faster (~2m vs 16m) and sufficient for E2E
# since we're using VIBES_MOCK_PTY mode anyway
run: nix develop --command cargo build
- name: Install Playwright browsers
run: nix develop --command just web e2e-setup
- name: Run E2E smoke tests
run: nix develop --command just web e2e
env:
# Use mock PTY mode since Claude CLI isn't installed in CI
VIBES_MOCK_PTY: "1"
- name: Upload test artifacts
uses: actions/upload-artifact@v4
if: failure()
with:
name: playwright-results
path: |
e2e-tests/playwright-report/
e2e-tests/test-results/
retention-days: 7
coverage:
runs-on: ubuntu-latest
needs: check # Run after check job passes
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Cache cargo
uses: Swatinem/rust-cache@v2
with:
cache-all-crates: true
shared-key: "rust-cache"
workspaces: |
. -> target
vendor/iggy -> target
- name: Generate coverage
run: nix develop --command just coverage lcov
- name: Upload to Codecov
uses: codecov/codecov-action@v4
with:
files: target/lcov.info
fail_ci_if_error: false