Skip to content

Commit b7ca690

Browse files
authored
Merge branch 'feature/DC-172-design-system' into feature/DC-172-backend-enrollment
2 parents a9c2960 + 23039be commit b7ca690

85 files changed

Lines changed: 4177 additions & 2554 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/skills/multi-repo-git/SKILL.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ Manage git operations across the SEBT portal's four repositories in parallel.
1111
## Repositories
1212

1313
```
14-
SEBT_BASE="~/Projects/SEBT"
14+
# Assumes all four SEBT repos are sibling directories under a common parent
15+
SEBT_BASE="$(dirname "$(git rev-parse --show-toplevel)")"
1516
1617
portal="$SEBT_BASE/sebt-self-service-portal"
1718
state_connector="$SEBT_BASE/sebt-self-service-portal-state-connector"

.claude/skills/test/SKILL.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ Run tests across the SEBT portal's four repositories in parallel.
1111
## Repositories
1212

1313
```
14-
SEBT_BASE="~/Projects/SEBT"
14+
# Assumes all four SEBT repos are sibling directories under a common parent
15+
SEBT_BASE="$(dirname "$(git rev-parse --show-toplevel)")"
1516
1617
portal="$SEBT_BASE/sebt-self-service-portal"
1718
state_connector="$SEBT_BASE/sebt-self-service-portal-state-connector"
Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
name: Playwright E2E
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
push:
8+
branches: ["main"]
9+
pull_request:
10+
branches: ["main"]
11+
12+
jobs:
13+
e2e:
14+
name: E2E Tests
15+
runs-on: ubuntu-latest
16+
timeout-minutes: 15
17+
18+
services:
19+
mssql:
20+
image: mcr.microsoft.com/mssql/server:2022-latest
21+
env:
22+
ACCEPT_EULA: Y
23+
MSSQL_SA_PASSWORD: YourStrong@Passw0rd
24+
ports:
25+
- 1433:1433
26+
options: >-
27+
--health-cmd="/opt/mssql-tools18/bin/sqlcmd -S localhost -U sa -P YourStrong@Passw0rd -Q 'SELECT 1' -C -b -o /dev/null || exit 1"
28+
--health-interval=10s
29+
--health-timeout=5s
30+
--health-retries=10
31+
--health-start-period=10s
32+
33+
steps:
34+
- name: Checkout code
35+
uses: actions/checkout@v4
36+
37+
- name: Determine state connector ref
38+
id: connector-ref
39+
run: |
40+
BRANCH="${{ github.event_name == 'pull_request' && github.head_ref || github.ref_name }}"
41+
FALLBACK="${{ github.event_name == 'pull_request' && github.base_ref || 'main' }}"
42+
REPO_URL="https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository_owner }}/sebt-self-service-portal-state-connector.git"
43+
if git ls-remote --exit-code --heads "$REPO_URL" "refs/heads/${BRANCH}" 1>/dev/null 2>&1; then
44+
echo "ref=${BRANCH}" >> "$GITHUB_OUTPUT"
45+
else
46+
echo "ref=${FALLBACK}" >> "$GITHUB_OUTPUT"
47+
fi
48+
49+
- name: Checkout state connector
50+
uses: actions/checkout@v4
51+
with:
52+
repository: codeforamerica/sebt-self-service-portal-state-connector
53+
ref: ${{ steps.connector-ref.outputs.ref }}
54+
path: state-connector
55+
56+
- name: Setup .NET
57+
uses: actions/setup-dotnet@v5
58+
with:
59+
dotnet-version: "10.0.200"
60+
61+
- name: Setup pnpm
62+
uses: pnpm/action-setup@v4
63+
with:
64+
version: "10"
65+
66+
- name: Setup Node.js
67+
uses: actions/setup-node@v4
68+
with:
69+
node-version: "24"
70+
cache: "pnpm"
71+
72+
- name: Install dependencies
73+
run: pnpm install --frozen-lockfile --prefer-offline
74+
75+
- name: Build backend
76+
run: ./.github/workflows/scripts/build-backend.sh --configuration Release
77+
78+
- name: Install Playwright browsers
79+
run: cd src/SEBT.Portal.Web && pnpm exec playwright install --with-deps chromium
80+
81+
- name: Install Chrome for Pa11y
82+
run: cd src/SEBT.Portal.Web && pnpm exec puppeteer browsers install chrome
83+
84+
- name: Build frontend for E2E
85+
env:
86+
STATE: dc
87+
NEXT_PUBLIC_STATE: dc
88+
run: ./.github/workflows/scripts/build-frontend.sh --production
89+
90+
- name: Run Pa11y and Playwright E2E tests
91+
env:
92+
CI: true
93+
SKIP_WEB_SERVER: "1"
94+
STATE: dc
95+
NEXT_PUBLIC_STATE: dc
96+
ASPNETCORE_ENVIRONMENT: Development
97+
ConnectionStrings__DefaultConnection: "Server=localhost,1433;Database=SebtPortal;User Id=sa;Password=YourStrong@Passw0rd;TrustServerCertificate=True;"
98+
JwtSettings__SecretKey: "ci-e2e-jwt-secret-at-least-32-characters-long"
99+
IdentifierHasher__SecretKey: "ci-e2e-identifier-hasher-key-32chars"
100+
Oidc__CompleteLoginSigningKey: "ci-e2e-oidc-signing-key-at-least-32-chars"
101+
PluginAssemblyPaths__0: "plugins-dc"
102+
UseMockHouseholdData: "true"
103+
run: |
104+
# Start API in dev mode + frontend from production build
105+
pnpm api:dev &
106+
cd src/SEBT.Portal.Web && pnpm start &
107+
cd ..
108+
echo "Waiting for server at http://localhost:3000..."
109+
for i in $(seq 1 90); do
110+
curl -sf --max-time 15 http://localhost:3000 > /dev/null && echo "Server ready" && break
111+
sleep 2
112+
done
113+
curl -sf --max-time 15 http://localhost:3000 > /dev/null || (echo "Server failed to start" && exit 1)
114+
echo "Running Pa11y accessibility tests..."
115+
pnpm ci:test:a11y
116+
echo "Running Playwright E2E tests..."
117+
pnpm ci:test:e2e
118+
119+
- name: Upload Playwright report
120+
uses: actions/upload-artifact@v4
121+
if: ${{ !cancelled() }}
122+
with:
123+
name: playwright-report
124+
path: src/SEBT.Portal.Web/playwright-report/
125+
retention-days: 7

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@ scripts/scratch/
2525
*.sln.docstates
2626
*.env
2727

28-
# Local development config (use appsettings.Development.example.json as template)
28+
# Local/deployed config (use matching .example.json as template)
2929
src/SEBT.Portal.Api/appsettings.Development.json
30+
src/SEBT.Portal.Api/appsettings.dc.json
31+
src/SEBT.Portal.Api/appsettings.co.json
3032

3133
# User-specific files (MonoDevelop/Xamarin Studio)
3234
*.userprefs
@@ -459,6 +461,8 @@ output
459461
**/*.tfplan
460462
**/crash.log
461463
**/crash.*.log
464+
# Lambda zip artifacts created by the archive_file data source during tofu plan/apply
465+
tofu/modules/sebt_ses/lambda/*.zip
462466

463467

464468
# Superpowers brainstorm artifacts

.husky/pre-commit

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,20 @@ if [ "$BACKEND_CHANGES" = "true" ]; then
9393

9494
if command -v dotnet &> /dev/null; then
9595
# Verify code formatting matches .editorconfig (fails if changes needed)
96-
dotnet format SEBT.Portal.sln --verify-no-changes --verbosity quiet || {
96+
# Exclude sibling repos (state-connector, dc-connector, co-connector) that get
97+
# pulled in via conditional ProjectReference but live outside this repository.
98+
dotnet format SEBT.Portal.sln --verify-no-changes --verbosity quiet \
99+
--exclude ../sebt-self-service-portal-state-connector/ \
100+
--exclude ../sebt-self-service-portal-dc-connector/ \
101+
--exclude ../sebt-self-service-portal-co-connector/ || {
97102
log_error ".NET code formatting check failed - run 'dotnet format SEBT.Portal.sln' to fix"
98103
exit 1
99104
}
100-
101-
dotnet format SEBT.Portal.sln analyzers --verify-no-changes --verbosity quiet || {
105+
106+
dotnet format SEBT.Portal.sln analyzers --verify-no-changes --verbosity quiet \
107+
--exclude ../sebt-self-service-portal-state-connector/ \
108+
--exclude ../sebt-self-service-portal-dc-connector/ \
109+
--exclude ../sebt-self-service-portal-co-connector/ || {
102110
log_error ".NET analyzer checks failed - fix the reported issues"
103111
exit 1
104112
}

0 commit comments

Comments
 (0)