Skip to content

Commit 283c56e

Browse files
Merge branch 'main' into issue-558-trial-ab-testing
2 parents a603d71 + c70db69 commit 283c56e

502 files changed

Lines changed: 48096 additions & 2966 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.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Bundle Size Analysis
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
7+
jobs:
8+
analyze:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v6
12+
- uses: actions/setup-node@v6
13+
with:
14+
node-version: '20'
15+
cache: npm
16+
- run: npm ci
17+
- run: npx expo export --platform web --output-dir dist
18+
- name: Analyze bundle
19+
run: |
20+
npx size-limit
21+
echo "Bundle size analysis complete"

.github/workflows/cdn-deploy.yml

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
name: CDN Configuration Deploy
2+
3+
on:
4+
push:
5+
branches: [main, develop]
6+
paths:
7+
- 'infra/fastly/**'
8+
- '.github/workflows/cdn-deploy.yml'
9+
workflow_dispatch:
10+
inputs:
11+
provider:
12+
description: 'CDN provider'
13+
required: true
14+
default: 'fastly'
15+
type: choice
16+
options:
17+
- fastly
18+
- cloudflare
19+
20+
env:
21+
NODE_VERSION: '20'
22+
23+
jobs:
24+
validate-vcl:
25+
name: Validate Fastly VCL
26+
runs-on: ubuntu-latest
27+
steps:
28+
- name: Checkout code
29+
uses: actions/checkout@v4
30+
31+
- name: Check VCL syntax (basic)
32+
run: |
33+
test -f infra/fastly/snippets/recv.vcl
34+
test -f infra/fastly/snippets/fetch.vcl
35+
grep -q "s-maxage" infra/fastly/snippets/fetch.vcl
36+
grep -q "/plans" infra/fastly/snippets/recv.vcl
37+
echo "VCL snippet validation passed"
38+
39+
deploy-fastly:
40+
name: Deploy Fastly VCL Snippet
41+
needs: validate-vcl
42+
if: >
43+
github.event_name == 'push' ||
44+
(github.event_name == 'workflow_dispatch' && github.event.inputs.provider == 'fastly')
45+
runs-on: ubuntu-latest
46+
environment: production
47+
steps:
48+
- name: Checkout code
49+
uses: actions/checkout@v4
50+
51+
- name: Deploy VCL snippet to Fastly
52+
env:
53+
FASTLY_API_TOKEN: ${{ secrets.FASTLY_API_TOKEN }}
54+
FASTLY_SERVICE_ID: ${{ secrets.FASTLY_SERVICE_ID }}
55+
run: |
56+
if [ -z "$FASTLY_API_TOKEN" ] || [ -z "$FASTLY_SERVICE_ID" ]; then
57+
echo "Fastly credentials not configured — skipping deploy (CI validation only)"
58+
exit 0
59+
fi
60+
chmod +x scripts/deploy-fastly-vcl.sh
61+
./scripts/deploy-fastly-vcl.sh infra/fastly/snippets
62+
63+
deploy-cloudflare:
64+
name: Deploy Cloudflare Cache Rules
65+
needs: validate-vcl
66+
if: github.event_name == 'workflow_dispatch' && github.event.inputs.provider == 'cloudflare'
67+
runs-on: ubuntu-latest
68+
environment: production
69+
steps:
70+
- name: Checkout code
71+
uses: actions/checkout@v4
72+
73+
- name: Verify Cloudflare cache tag support
74+
env:
75+
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
76+
CLOUDFLARE_ZONE_ID: ${{ secrets.CLOUDFLARE_ZONE_ID }}
77+
run: |
78+
if [ -z "$CLOUDFLARE_API_TOKEN" ] || [ -z "$CLOUDFLARE_ZONE_ID" ]; then
79+
echo "Cloudflare credentials not configured — skipping deploy"
80+
exit 0
81+
fi
82+
echo "Cloudflare purge-by-tag configured via CDN_PROVIDER=cloudflare"
83+
echo "Origin sets Cache-Tag header alongside Surrogate-Key"
84+
85+
run-cache-tests:
86+
name: CDN Cache Unit Tests
87+
needs: validate-vcl
88+
runs-on: ubuntu-latest
89+
steps:
90+
- name: Checkout code
91+
uses: actions/checkout@v4
92+
93+
- name: Setup Node.js
94+
uses: actions/setup-node@v4
95+
with:
96+
node-version: ${{ env.NODE_VERSION }}
97+
cache: 'npm'
98+
99+
- name: Install dependencies
100+
run: npm ci --legacy-peer-deps
101+
102+
- name: Run CDN cache tests
103+
run: npm run test:cdn

.github/workflows/ci.yml

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,41 @@ jobs:
192192
name: coverage-report-${{ matrix.shard }}
193193
path: coverage/lcov.info
194194

195+
accessibility-tests:
196+
name: Accessibility Tests
197+
runs-on: ubuntu-latest
198+
steps:
199+
- name: Checkout code
200+
uses: actions/checkout@v4
201+
202+
- name: Setup Node.js
203+
uses: actions/setup-node@v4
204+
with:
205+
node-version: ${{ env.NODE_VERSION }}
206+
cache: 'npm'
207+
208+
- name: Cache node modules
209+
uses: actions/cache@v4
210+
id: cache-node-modules
211+
with:
212+
path: node_modules
213+
key: ${{ runner.os }}-node-${{ env.NODE_VERSION }}-${{ hashFiles('package-lock.json') }}
214+
215+
- name: Install dependencies
216+
if: steps.cache-node-modules.outputs.cache-hit != 'true'
217+
run: npm ci --legacy-peer-deps
218+
219+
- name: Run accessibility tests
220+
run: npm run test:a11y
221+
222+
- name: Upload accessibility report
223+
if: always()
224+
uses: actions/upload-artifact@v4
225+
with:
226+
name: accessibility-report
227+
path: accessibility-report.json
228+
if-no-files-found: ignore
229+
195230
typescript-build:
196231
name: TypeScript Build
197232
runs-on: ubuntu-latest
@@ -247,7 +282,7 @@ jobs:
247282
sonarcloud:
248283
name: SonarCloud Analysis
249284
runs-on: ubuntu-latest
250-
needs: [typescript-tests]
285+
needs: [typescript-tests, accessibility-tests]
251286
if: github.event_name == 'pull_request' || github.ref == 'refs/heads/main'
252287
steps:
253288
- name: Checkout code
@@ -517,6 +552,7 @@ jobs:
517552
typescript-lint,
518553
typescript-typecheck,
519554
typescript-tests,
555+
accessibility-tests,
520556
typescript-build,
521557
sonarcloud,
522558
rust-format,
@@ -544,6 +580,7 @@ jobs:
544580
typescript-lint,
545581
typescript-typecheck,
546582
typescript-tests,
583+
accessibility-tests,
547584
typescript-build,
548585
sonarcloud,
549586
rust-format,
@@ -564,6 +601,7 @@ jobs:
564601
if [ "${{ needs.typescript-lint.result }}" != "success" ] || \
565602
[ "${{ needs.typescript-typecheck.result }}" != "success" ] || \
566603
[ "${{ needs.typescript-tests.result }}" != "success" ] || \
604+
[ "${{ needs.accessibility-tests.result }}" != "success" ] || \
567605
[ "${{ needs.typescript-build.result }}" != "success" ] || \
568606
[ "${{ needs.sonarcloud.result }}" != "success" ] || \
569607
[ "${{ needs.rust-format.result }}" != "success" ] || \
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Notification Service CI
2+
3+
on:
4+
push:
5+
branches: [main, feat/575-notification-microservice]
6+
paths: ['services/notification/**', 'backend/messaging/**']
7+
pull_request:
8+
branches: [main]
9+
paths: ['services/notification/**', 'backend/messaging/**']
10+
11+
jobs:
12+
typecheck-lint-test:
13+
runs-on: ubuntu-latest
14+
defaults:
15+
run:
16+
working-directory: services/notification
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v4
20+
21+
- name: Setup Node.js
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: '20'
25+
cache: 'npm'
26+
cache-dependency-path: services/notification/package-lock.json
27+
28+
- name: Install dependencies
29+
run: npm ci --legacy-peer-deps
30+
31+
- name: Typecheck
32+
run: npm run typecheck
33+
34+
- name: Lint
35+
run: npm run lint
36+
37+
- name: Test
38+
run: npm run test -- --coverage
39+
40+
- name: Upload coverage
41+
uses: actions/upload-artifact@v4
42+
if: always()
43+
with:
44+
name: notification-coverage
45+
path: services/notification/coverage/

.github/workflows/sdk-generate.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: SDK Auto-Generation
2+
3+
on:
4+
push:
5+
paths:
6+
- 'spec/openapi.yaml'
7+
- 'scripts/sdk-generate.sh'
8+
- '.github/workflows/sdk-generate.yml'
9+
pull_request:
10+
paths:
11+
- 'spec/openapi.yaml'
12+
13+
jobs:
14+
validate-spec:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
- name: Validate OpenAPI spec
19+
uses: mbowman100/swagger-validator-action@v1
20+
with:
21+
files: spec/openapi.yaml
22+
- name: Check breaking changes
23+
uses: ponelat/oas-breaking-changes-action@v1
24+
with:
25+
spec-file: spec/openapi.yaml
26+
old-spec-file: docs/openapi.yaml
27+
28+
generate-sdks:
29+
needs: validate-spec
30+
runs-on: ubuntu-latest
31+
strategy:
32+
matrix:
33+
language: [javascript, python, go]
34+
steps:
35+
- uses: actions/checkout@v4
36+
- uses: actions/setup-node@v4
37+
with:
38+
node-version: '20'
39+
cache: 'npm'
40+
- uses: actions/setup-python@v5
41+
with:
42+
python-version: '3.11'
43+
if: matrix.language == 'python'
44+
- uses: actions/setup-go@v5
45+
with:
46+
go-version: '1.22'
47+
if: matrix.language == 'go'
48+
- name: Generate ${{ matrix.language }} SDK
49+
run: bash scripts/sdk-generate.sh ${{ matrix.language }}
50+
- name: Check for changes
51+
id: diff
52+
run: |
53+
if [ -n "$(git status --porcelain sdks/${{ matrix.language }}/)" ]; then
54+
echo "changed=true" >> $GITHUB_OUTPUT
55+
else
56+
echo "changed=false" >> $GITHUB_OUTPUT
57+
fi
58+
- name: Create PR for SDK changes
59+
if: steps.diff.outputs.changed == 'true' && github.event_name == 'push'
60+
env:
61+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
62+
run: |
63+
BRANCH="sdk-auto/${{ matrix.language }}-$(date +%s)"
64+
git checkout -b "$BRANCH"
65+
git add sdks/${{ matrix.language }}/
66+
git commit -m "chore(sdk): auto-generate ${{ matrix.language }} SDK from OpenAPI spec"
67+
git push origin "$BRANCH"
68+
gh pr create \
69+
--base main \
70+
--title "chore(sdk): auto-generate ${{ matrix.language }} SDK" \
71+
--body "Auto-generated ${{ matrix.language }} SDK from OpenAPI spec changes in \`spec/openapi.yaml\`." \
72+
--label automated

.gitignore

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,14 @@ logs/
7070
coverage/
7171
.nyc_output/
7272

73+
# Test snapshots & generated test/lint artifacts
74+
**/__snapshots__/
75+
*.snap
76+
junit.xml
77+
jest-results.json
78+
*_output.txt
79+
*_output_*.txt
80+
7381
# Load test reports (generated) — keep the dir so k6 can write into it
7482
load-tests/reports/*
7583
!load-tests/reports/.gitkeep
@@ -82,10 +90,57 @@ load-tests/reports/*
8290
.expo-shared/
8391

8492

93+
# Test snapshots
94+
__snapshots__/
95+
*.snap
96+
8597
# Build artifacts
8698
build_errors*.txt
8799
*.log
88100
contracts/migrations/history/*
89101
!contracts/migrations/history/.gitkeep
90102
contracts/migrations/snapshots/*
91103
!contracts/migrations/snapshots/.gitkeep
104+
105+
# Rust / Soroban test snapshots (generated by soroban-sdk test runner)
106+
contracts/**/test_snapshots/
107+
test_snapshots/
108+
109+
# Generated files
110+
*.orig
111+
SubTrackr
112+
test_output.txt
113+
tsc_output*.txt
114+
lint_output*.txt
115+
lint_final_error.txt
116+
final_lint_check.txt
117+
contracts/clippy_output.txt
118+
issue*.json
119+
issues_summary.json
120+
COMPLETION_SUMMARY.md
121+
RACE_CONDITION_FIX.md
122+
JS_BUNDLE_FIX.md
123+
BUILD_FIX_GUIDE.md
124+
PR_BODY_*.md
125+
PR_CI_*.md
126+
BUNDLE_AUDIT.md
127+
DESIGN_SYSTEM_INTEGRATION.md
128+
DESIGN_SYSTEM_IMPLEMENTATION.md
129+
DESIGN_SYSTEM_SETUP.md
130+
WCAG_COMPLIANCE.md
131+
132+
# Backup / duplicate files
133+
*.backup
134+
*\ copy.*
135+
package.json.backup
136+
SubTrackr
137+
FORMATTING.md
138+
package.json.backup
139+
# Test run artifacts (NOT the committed contract insta snapshots under
140+
# contracts/**/test_snapshots/, which are intentional fixtures)
141+
test-results/
142+
playwright-report/
143+
e2e/artifacts/
144+
e2e/screenshots/
145+
*.snap.orig
146+
.jest-cache/

0 commit comments

Comments
 (0)