Skip to content

Commit 8a4e623

Browse files
authored
Merge branch 'main' into feat/559-customer-health-scoring
2 parents c80ecc5 + d4e0b91 commit 8a4e623

427 files changed

Lines changed: 42487 additions & 3010 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.

.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
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: 51 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
@@ -93,3 +101,46 @@ contracts/migrations/history/*
93101
!contracts/migrations/history/.gitkeep
94102
contracts/migrations/snapshots/*
95103
!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/

.storybook/main.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
/**
22
* Storybook Configuration for SubTrackr Design System
3-
*
3+
*
44
* Location: .storybook/main.js
55
* Run: npm run storybook
66
*/
77

88
module.exports = {
9-
stories: [
10-
'../src/design-system/stories/**/*.stories.{ts,tsx}',
11-
'../src/**/*.stories.{ts,tsx}',
12-
],
9+
stories: ['../src/design-system/stories/**/*.stories.{ts,tsx}', '../src/**/*.stories.{ts,tsx}'],
1310
addons: [
1411
'@storybook/addon-essentials',
1512
'@storybook/addon-ondevice-actions',
@@ -30,7 +27,7 @@ module.exports = {
3027
reactDocgenTypescriptOptions: {
3128
shouldExtractLiteralValuesAsTypes: true,
3229
shouldRemoveUndefinedFromOptional: true,
33-
propFilter: (prop: any) => {
30+
propFilter: (prop) => {
3431
if (prop.parent) {
3532
return !prop.parent.fileName.includes('node_modules');
3633
}

0 commit comments

Comments
 (0)