Skip to content

Commit cac17ec

Browse files
Merge branch 'feature/playwright-tests' into develop
2 parents d68313a + 818568d commit cac17ec

121 files changed

Lines changed: 64752 additions & 362 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"mcpServers": {
3+
"codegraph": {
4+
"type": "stdio",
5+
"command": "npx",
6+
"args": [
7+
"@colbymchenry/codegraph",
8+
"serve",
9+
"--mcp"
10+
]
11+
}
12+
}
13+
}

.claude/CLAUDE.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<!-- CODEGRAPH_START -->
2+
## CodeGraph
3+
4+
CodeGraph builds a semantic knowledge graph of codebases for faster, smarter code exploration.
5+
6+
### If `.codegraph/` exists in the project
7+
8+
**Use codegraph tools for faster exploration.** These tools provide instant lookups via the code graph instead of scanning files:
9+
10+
| Tool | Use For |
11+
|------|---------|
12+
| `codegraph_search` | Find symbols by name (functions, classes, types) |
13+
| `codegraph_context` | Get relevant code context for a task |
14+
| `codegraph_callers` | Find what calls a function |
15+
| `codegraph_callees` | Find what a function calls |
16+
| `codegraph_impact` | See what's affected by changing a symbol |
17+
| `codegraph_node` | Get details + source code for a symbol |
18+
19+
**When spawning Explore agents in a codegraph-enabled project:**
20+
21+
Tell the Explore agent to use codegraph tools for faster exploration.
22+
23+
**For quick lookups in the main session:**
24+
- Use `codegraph_search` instead of grep for finding symbols
25+
- Use `codegraph_callers`/`codegraph_callees` to trace code flow
26+
- Use `codegraph_impact` before making changes to see what's affected
27+
28+
### If `.codegraph/` does NOT exist
29+
30+
At the start of a session, ask the user if they'd like to initialize CodeGraph:
31+
32+
"I notice this project doesn't have CodeGraph initialized. Would you like me to run `codegraph init -i` to build a code knowledge graph?"
33+
<!-- CODEGRAPH_END -->

.claude/settings.json

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"permissions": {
3+
"allow": [
4+
"mcp__codegraph__codegraph_search",
5+
"mcp__codegraph__codegraph_context",
6+
"mcp__codegraph__codegraph_callers",
7+
"mcp__codegraph__codegraph_callees",
8+
"mcp__codegraph__codegraph_impact",
9+
"mcp__codegraph__codegraph_node",
10+
"mcp__codegraph__codegraph_status"
11+
]
12+
},
13+
"hooks": {
14+
"PostToolUse": [
15+
{
16+
"matcher": "Edit|Write",
17+
"hooks": [
18+
{
19+
"type": "command",
20+
"command": "npx @colbymchenry/codegraph mark-dirty",
21+
"async": true
22+
}
23+
]
24+
}
25+
],
26+
"Stop": [
27+
{
28+
"matcher": ".*",
29+
"hooks": [
30+
{
31+
"type": "command",
32+
"command": "npx @colbymchenry/codegraph sync-if-dirty"
33+
}
34+
]
35+
}
36+
]
37+
}
38+
}

.claude/settings.local.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"permissions": {
3+
"allow": [
4+
"Bash(npx playwright:*)",
5+
"Bash(git add:*)",
6+
"Bash(git commit:*)"
7+
]
8+
}
9+
}

.codegraph/.gitignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# CodeGraph data files
2+
# These are local to each machine and should not be committed
3+
4+
# Database
5+
*.db
6+
*.db-wal
7+
*.db-shm
8+
9+
# Cache
10+
cache/
11+
12+
# Logs
13+
*.log
14+
15+
# Hook markers
16+
.dirty

.codegraph/config.json

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
{
2+
"version": 1,
3+
"include": [
4+
"**/*.ts",
5+
"**/*.tsx",
6+
"**/*.js",
7+
"**/*.jsx",
8+
"**/*.py",
9+
"**/*.go",
10+
"**/*.rs",
11+
"**/*.java",
12+
"**/*.c",
13+
"**/*.h",
14+
"**/*.cpp",
15+
"**/*.hpp",
16+
"**/*.cc",
17+
"**/*.cxx",
18+
"**/*.cs",
19+
"**/*.php",
20+
"**/*.rb",
21+
"**/*.swift",
22+
"**/*.kt",
23+
"**/*.kts",
24+
"**/*.dart",
25+
"**/*.svelte",
26+
"**/*.liquid"
27+
],
28+
"exclude": [
29+
"**/.git/**",
30+
"**/node_modules/**",
31+
"**/vendor/**",
32+
"**/Pods/**",
33+
"**/dist/**",
34+
"**/build/**",
35+
"**/out/**",
36+
"**/bin/**",
37+
"**/obj/**",
38+
"**/target/**",
39+
"**/*.min.js",
40+
"**/*.bundle.js",
41+
"**/.next/**",
42+
"**/.nuxt/**",
43+
"**/.svelte-kit/**",
44+
"**/.output/**",
45+
"**/.turbo/**",
46+
"**/.cache/**",
47+
"**/.parcel-cache/**",
48+
"**/.vite/**",
49+
"**/.astro/**",
50+
"**/.docusaurus/**",
51+
"**/.gatsby/**",
52+
"**/.webpack/**",
53+
"**/.nx/**",
54+
"**/.yarn/cache/**",
55+
"**/.pnpm-store/**",
56+
"**/storybook-static/**",
57+
"**/.expo/**",
58+
"**/web-build/**",
59+
"**/ios/Pods/**",
60+
"**/ios/build/**",
61+
"**/android/build/**",
62+
"**/android/.gradle/**",
63+
"**/__pycache__/**",
64+
"**/.venv/**",
65+
"**/venv/**",
66+
"**/site-packages/**",
67+
"**/dist-packages/**",
68+
"**/.pytest_cache/**",
69+
"**/.mypy_cache/**",
70+
"**/.ruff_cache/**",
71+
"**/.tox/**",
72+
"**/.nox/**",
73+
"**/*.egg-info/**",
74+
"**/.eggs/**",
75+
"**/go/pkg/mod/**",
76+
"**/target/debug/**",
77+
"**/target/release/**",
78+
"**/.gradle/**",
79+
"**/.m2/**",
80+
"**/generated-sources/**",
81+
"**/.kotlin/**",
82+
"**/.dart_tool/**",
83+
"**/.vs/**",
84+
"**/.nuget/**",
85+
"**/artifacts/**",
86+
"**/publish/**",
87+
"**/cmake-build-*/**",
88+
"**/CMakeFiles/**",
89+
"**/bazel-*/**",
90+
"**/vcpkg_installed/**",
91+
"**/.conan/**",
92+
"**/Debug/**",
93+
"**/Release/**",
94+
"**/x64/**",
95+
"**/release/**",
96+
"**/*.app/**",
97+
"**/*.asar",
98+
"**/DerivedData/**",
99+
"**/.build/**",
100+
"**/.swiftpm/**",
101+
"**/xcuserdata/**",
102+
"**/Carthage/Build/**",
103+
"**/SourcePackages/**",
104+
"**/.composer/**",
105+
"**/storage/framework/**",
106+
"**/bootstrap/cache/**",
107+
"**/.bundle/**",
108+
"**/tmp/cache/**",
109+
"**/public/assets/**",
110+
"**/public/packs/**",
111+
"**/.yardoc/**",
112+
"**/coverage/**",
113+
"**/htmlcov/**",
114+
"**/.nyc_output/**",
115+
"**/test-results/**",
116+
"**/.coverage/**",
117+
"**/.idea/**",
118+
"**/logs/**",
119+
"**/tmp/**",
120+
"**/temp/**",
121+
"**/_build/**",
122+
"**/docs/_build/**",
123+
"**/site/**"
124+
],
125+
"languages": [],
126+
"frameworks": [],
127+
"maxFileSize": 1048576,
128+
"extractDocstrings": true,
129+
"trackCallSites": true,
130+
"enableEmbeddings": false
131+
}

.github/workflows/playwright.yml

Lines changed: 111 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,120 @@
11
name: Playwright Tests
2+
23
on:
34
push:
4-
branches: [ main, master ]
5+
branches: [ main, master, develop ]
56
pull_request:
6-
branches: [ main, master ]
7+
branches: [ main, master, develop ]
8+
workflow_dispatch:
9+
710
jobs:
811
test:
12+
name: Run Playwright Tests
913
timeout-minutes: 60
1014
runs-on: ubuntu-latest
15+
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
project: [chromium, firefox, webkit]
20+
1121
steps:
12-
- uses: actions/checkout@v4
13-
- uses: actions/setup-node@v4
14-
with:
15-
node-version: lts/*
16-
- name: Install dependencies
17-
run: npm ci
18-
- name: Install Playwright Browsers
19-
run: npx playwright install --with-deps
20-
- name: Run Playwright tests
21-
run: npx playwright test
22-
- uses: actions/upload-artifact@v4
23-
if: ${{ !cancelled() }}
24-
with:
25-
name: playwright-report
26-
path: playwright-report/
27-
retention-days: 30
22+
- name: Checkout code
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+
31+
- name: Install dependencies
32+
run: npm ci
33+
34+
- name: Install Playwright Browsers
35+
run: npx playwright install --with-deps ${{ matrix.project }}
36+
37+
- name: Run Playwright tests
38+
run: npx playwright test --project=${{ matrix.project }}
39+
env:
40+
CI: true
41+
42+
- name: Upload HTML Report
43+
uses: actions/upload-artifact@v4
44+
if: always()
45+
with:
46+
name: playwright-report-${{ matrix.project }}
47+
path: playwright-report/
48+
retention-days: 30
49+
50+
- name: Upload Test Artifacts (on failure)
51+
uses: actions/upload-artifact@v4
52+
if: failure()
53+
with:
54+
name: test-artifacts-${{ matrix.project }}
55+
path: |
56+
test-results/
57+
playwright-report/
58+
retention-days: 30
59+
60+
- name: Upload JUnit Results
61+
uses: actions/upload-artifact@v4
62+
if: always()
63+
with:
64+
name: junit-results-${{ matrix.project }}
65+
path: test-results/junit.xml
66+
retention-days: 30
67+
68+
report:
69+
name: Publish Test Report
70+
needs: test
71+
runs-on: ubuntu-latest
72+
if: always()
73+
74+
steps:
75+
- name: Download all artifacts
76+
uses: actions/download-artifact@v4
77+
with:
78+
path: all-reports
79+
80+
- name: Publish Test Report
81+
uses: dorny/test-reporter@v1
82+
if: always()
83+
with:
84+
name: Playwright Test Results
85+
path: 'all-reports/junit-results-*/junit.xml'
86+
reporter: java-junit
87+
fail-on-error: false
88+
89+
comment-pr:
90+
name: Comment on PR
91+
needs: test
92+
runs-on: ubuntu-latest
93+
if: github.event_name == 'pull_request' && always()
94+
permissions:
95+
pull-requests: write
96+
97+
steps:
98+
- name: Comment test results on PR
99+
uses: actions/github-script@v7
100+
with:
101+
script: |
102+
let comment = '## 🎭 Playwright Test Results\n\n';
103+
comment += '| Browser | Status |\n';
104+
comment += '|---------|--------|\n';
105+
106+
const browsers = ['chromium', 'firefox', 'webkit'];
107+
const status = '${{ needs.test.result }}' === 'success' ? '✅ Passed' : '❌ Failed';
108+
109+
for (const browser of browsers) {
110+
comment += `| ${browser} | ${status} |\n`;
111+
}
112+
113+
comment += '\n📊 [View detailed report](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})';
114+
115+
github.rest.issues.createComment({
116+
issue_number: context.issue.number,
117+
owner: context.repo.owner,
118+
repo: context.repo.repo,
119+
body: comment
120+
});

0 commit comments

Comments
 (0)