Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 11 additions & 32 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ jobs:
'

test-e2e:
name: E2E Test (${{ matrix.scope }})
name: E2E Test (${{ matrix.shard }})
needs:
- check
- build-e2e-artifacts
Expand All @@ -141,35 +141,14 @@ jobs:
fail-fast: false
matrix:
include:
- scope: api-mcp
paths: tests/e2e/src/app/api
- scope: public-web
paths: |
tests/e2e/src/app/test.ts
tests/e2e/src/app/bus
tests/e2e/src/app/bus-map
tests/e2e/src/app/courses
tests/e2e/src/app/guides
tests/e2e/src/app/mobile-app
tests/e2e/src/app/privacy
tests/e2e/src/app/sections
tests/e2e/src/app/signin
tests/e2e/src/app/teachers
tests/e2e/src/app/terms
tests/e2e/src/app/u
tests/e2e/src/app/welcome
tests/e2e/mobile-screenshots
- scope: signed-in
paths: |
tests/e2e/src/app/dashboard
tests/e2e/src/app/e2e
tests/e2e/src/app/oauth
tests/e2e/src/app/settings
- scope: admin-comments
paths: |
tests/e2e/src/app/admin
tests/e2e/src/app/comments
tests/e2e/src/app/error
- shard: 1/4
artifact: shard-1
- shard: 2/4
artifact: shard-2
- shard: 3/4
artifact: shard-3
- shard: 4/4
artifact: shard-4
permissions:
contents: read
uses: ./.github/workflows/db-backed-bun-job.yml
Expand All @@ -183,8 +162,8 @@ jobs:
download-artifact-name: e2e-svelte-kit
download-artifact-path: .svelte-kit
job-phase: ci:e2e:test
e2e-test-paths: ${{ matrix.paths }}
upload-artifact-name: playwright-report-${{ matrix.scope }}
e2e-shard: ${{ matrix.shard }}
upload-artifact-name: playwright-report-${{ matrix.artifact }}
upload-artifact-path: playwright-report/
upload-artifact-no-files-found: ignore
upload-artifact-always: true
Expand Down
19 changes: 5 additions & 14 deletions .github/workflows/db-backed-bun-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
job-phase:
required: true
type: string
e2e-test-paths:
e2e-shard:
required: false
type: string
default: ""
Expand Down Expand Up @@ -127,28 +127,19 @@ jobs:
- name: Run job phase
shell: bash
env:
E2E_TEST_PATHS: ${{ inputs.e2e-test-paths }}
E2E_SHARD: ${{ inputs.e2e-shard }}
JOB_PHASE: ${{ inputs.job-phase }}
run: |
run_e2e_test_phase() {
local -a paths=()
local path

while IFS= read -r path; do
if [ -n "$path" ]; then
paths+=("$path")
fi
done <<< "$E2E_TEST_PATHS"

if [ "${#paths[@]}" -eq 0 ]; then
echo "::error::ci:e2e:test requires e2e-test-paths."
if [[ ! "$E2E_SHARD" =~ ^[1-9][0-9]*/[1-9][0-9]*$ ]]; then
echo "::error::ci:e2e:test requires e2e-shard in current/total format."
exit 1
fi

bun run app:prepare
bun run db:migrate:deploy
bunx prisma db seed
bunx playwright test "${paths[@]}"
bunx playwright test --shard="$E2E_SHARD"
}

case "$JOB_PHASE" in
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/static-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
STATIC_SNAPSHOT_URL: ${{ vars.STATIC_SNAPSHOT_URL || 'https://static.life-ustc.tiankaima.dev/life-ustc-static.sqlite' }}
STATIC_LOADER_MIN_SEMESTER: ${{ vars.STATIC_LOADER_MIN_SEMESTER || '401' }}
STATIC_LOADER_DRY_RUN: ${{ inputs.dry-run }}
STATIC_LOADER_DRY_RUN: ${{ inputs.dry-run || 'false' }}
STATIC_LOADER_BOOTSTRAP_IMPORT_STATE: ${{ github.event_name == 'workflow_dispatch' && inputs.bootstrap_import_state || false }}
STATIC_LOADER_RETIRE_MISSING_SECTIONS: ${{ github.event_name == 'workflow_dispatch' && inputs.retire_missing_sections || false }}
STATIC_LOADER_EXPECTED_SNAPSHOT_SHA256: ${{ github.event_name == 'workflow_dispatch' && inputs.expected_snapshot_sha256 || '' }}
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ contracts live in [docs/contracts/](./docs/contracts/).

```bash
bun install --frozen-lockfile
bun run hooks:install
cp .env.example .env
docker compose -f docker-compose.dev.yml up -d
bun run app:prepare
Expand Down
4 changes: 3 additions & 1 deletion docs/observability.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ high-cardinality resource IDs.

## Endpoints

No internal operational metrics/readiness endpoints are exposed by the app.
`GET /api/health` is a public, unauthenticated process-liveness endpoint that
returns `ok`. No internal metrics or dependency-readiness endpoints are exposed
by the app.

## Alerts

Expand Down
71 changes: 0 additions & 71 deletions examples/catalog_exam.json

This file was deleted.

77 changes: 0 additions & 77 deletions examples/catalog_lesson.json

This file was deleted.

10 changes: 0 additions & 10 deletions examples/catalog_semester.json

This file was deleted.

Loading