1- name : Test Shared Context
1+ name : CI
22
33on :
44 push :
5+ branches : [main]
56 paths :
6- - ' src/core/context/**'
7- - ' src/core/session/**'
8- - ' src/cli/**'
7+ - ' src/**'
8+ - ' scripts/**'
9+ - ' package.json'
10+ - ' package-lock.json'
11+ - ' tsconfig*.json'
12+ - ' esbuild.config.js'
13+ - ' vitest.config.ts'
914 - ' .github/workflows/test-shared-context.yml'
1015 pull_request :
16+ branches : [main]
1117 paths :
12- - ' src/core/context/**'
13- - ' src/core/session/**'
14- - ' src/cli/**'
18+ - ' src/**'
19+ - ' scripts/**'
20+ - ' package.json'
21+ - ' package-lock.json'
22+ - ' tsconfig*.json'
23+ - ' esbuild.config.js'
24+ - ' vitest.config.ts'
1525 workflow_dispatch :
1626
27+ concurrency :
28+ group : ci-${{ github.ref }}
29+ cancel-in-progress : true
30+
1731jobs :
1832 test :
1933 runs-on : ubuntu-latest
20-
34+
2135 strategy :
2236 matrix :
23- node-version : [18 .x, 20 .x]
24-
37+ node-version : [20 .x, 22 .x]
38+
2539 steps :
2640 - uses : actions/checkout@v4
27-
41+
2842 - name : Use Node.js ${{ matrix.node-version }}
2943 uses : actions/setup-node@v4
3044 with :
3145 node-version : ${{ matrix.node-version }}
3246 cache : ' npm'
33-
47+
3448 - name : Install dependencies
3549 run : npm ci
36-
50+
3751 - name : Build project
3852 run : npm run build
39-
53+
4054 - name : Verify dist artifacts
4155 run : npm run verify:dist
42-
43- - name : Run shared context tests
44- run : npm run test:shared-context
45- env :
46- CI : true
47-
56+
57+ - name : Run lint
58+ run : npm run lint
59+
4860 - name : Run all tests
4961 run : npm run test:run
5062 env :
6577 flags : unit
6678 fail_ci_if_error : false
6779 verbose : true
68-
80+
6981 - name : Upload test results
7082 if : always()
7183 uses : actions/upload-artifact@v4
@@ -78,49 +90,49 @@ jobs:
7890 integration :
7991 runs-on : ubuntu-latest
8092 needs : test
81-
93+
8294 steps :
8395 - uses : actions/checkout@v4
84-
96+
8597 - name : Setup Node.js
8698 uses : actions/setup-node@v4
8799 with :
88100 node-version : 20.x
89101 cache : ' npm'
90-
102+
91103 - name : Install dependencies
92104 run : npm ci
93-
105+
94106 - name : Build project
95107 run : npm run build
96-
108+
97109 - name : Verify dist artifacts
98110 run : npm run verify:dist
99-
111+
100112 - name : Test CLI integration
101113 run : |
102114 # Initialize test project
103115 mkdir -p /tmp/test-project
104116 cd /tmp/test-project
105117 npx stackmemory init
106-
107- # Test status command with shared context
118+
119+ # Test status command
108120 npx stackmemory status
109-
121+
110122 # Create test frames and sync
111123 echo "Testing shared context..." | npx stackmemory context push "Test Frame" --type task
112124 npx stackmemory context add decision "Use shared context for cross-session reference"
113-
125+
114126 # Verify context persistence
115127 npx stackmemory status --project
116-
128+
117129 - name : Verify shared context files
118130 run : |
119131 # Check if shared context directory exists
120132 if [ -d "$HOME/.stackmemory/shared-context" ]; then
121- echo "✅ Shared context directory exists"
133+ echo "Shared context directory exists"
122134 ls -la "$HOME/.stackmemory/shared-context/"
123135 else
124- echo "❌ Shared context directory not found"
136+ echo "Shared context directory not found"
125137 exit 1
126138 fi
0 commit comments