name: Admin portal tests on: push: paths: - 'lib/admin/**' - 'test/admin/**' - 'server/lib/handlers/market_history_admin_handler.dart' - 'server/lib/trading/market_history_admin_*.dart' - 'server/test/trading/market_history_admin_*.dart' - 'server/test/integration/market_history_admin_risk_test.dart' - 'server/test/helpers/admin_sync_run_fixtures.dart' - 'scripts/test-admin-portal.sh' - '.github/workflows/admin-portal.yml' pull_request: paths: - 'lib/admin/**' - 'test/admin/**' - 'server/lib/handlers/market_history_admin_handler.dart' - 'server/lib/trading/market_history_admin_*.dart' - 'server/test/trading/market_history_admin_*.dart' - 'server/test/integration/market_history_admin_risk_test.dart' - 'server/test/helpers/admin_sync_run_fixtures.dart' - 'scripts/test-admin-portal.sh' - '.github/workflows/admin-portal.yml' jobs: test: runs-on: ubuntu-latest services: postgres: image: postgres:16 env: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres POSTGRES_DB: postgres ports: - 5432:5432 options: >- --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 env: TEST_DATABASE_URL: postgres://postgres:postgres@localhost:5432/postgres steps: - uses: actions/checkout@v4 - uses: dart-lang/setup-dart@v1 - uses: subosito/flutter-action@v2 with: channel: stable - name: Run admin portal test suite env: TZ: UTC run: bash scripts/test-admin-portal.sh - name: Enforce admin portal coverage thresholds env: TZ: UTC run: bash scripts/check-admin-portal-coverage.sh