- Confirm repo root:
pwdshould be/home/jdkent/projects/neurostore. - Open and follow
.github/copilot-instructions.mdbefore running builds/tests. - If anything is unclear, fallback to
.github/workflows/workflow.yml.
- Use the commands in
.github/copilot-instructions.mdunder## Testing - Set Long Timeouts. - Do not invent alternate test commands unless the documented ones fail.
- Store:
cd storedocker compose exec -T store-pgsql17 bash -lc "psql -U postgres -tAc \"SELECT 1 FROM pg_database WHERE datname = 'store_test_db'\" | grep -q 1 || psql -U postgres -c \"create database store_test_db\""docker compose run -e "APP_ENV=docker_test" --rm neurostore bash -c "python -m pytest neurostore/tests"
- Compose:
cd composedocker compose exec -T compose-pgsql17 bash -lc "psql -U postgres -tAc \"SELECT 1 FROM pg_database WHERE datname = 'compose_test_db'\" | grep -q 1 || psql -U postgres -c \"create database compose_test_db\""docker compose run -e "APP_ENV=docker_test" --rm compose bash -c "python -m pytest neurosynth_compose/tests"
From monorepo root, cd compose/neurosynth-frontend first. First-time setup (.env.dev, npm install) is documented in .github/copilot-instructions.md § Frontend Development.
- Dev server:
npm run start:dev— Vite at http://localhost:3000 - Staging server:
npm run start:staging— same Vite server, but with--mode stagingso it loads.env.staging(staging backend URLs, Auth0 config). Create.env.stagingalongside.env.devbefore first use. - Unit tests (Vitest):
npm run test - Cypress E2E (headless):
npm run cy:e2e-headless— expects the app atbaseUrlincypress.config.ts(http://localhost:3000); full flows need backend services as described in copilot-instructions. Usenpm run cy:e2e-headless-devto load.env.devviaenv-cmd. - Cypress E2E against staging: Run
npm run start:stagingfirst, then use the matching staging script so Cypress and the app read the same env file: npm run cy:e2e-headless-staging— full headless run with.env.stagingnpm run cy:e2e-headless-staging-single -- <path/to/spec.cy.tsx>— single spec, headlessnpm run cy:e2e-browser-staging— interactive Chrome runner (npm run cy:e2e-browser-devis the dev equivalent)- Don't mix modes (for example, a dev server with staging Cypress); intercepts and auth will not match. If it's unclear whether DEV or STAGING is the target, ask.
- Staging build:
npm run build:staging— builds, prerenders, and generates the sitemap with--mode staging. - Embedded terminals / agents: If Cypress fails during binary verification with
bad option: --smoke-test(or similar), Electron was started with Node-mode env; prefix the command withenv -u ELECTRON_RUN_AS_NODE(e.g.env -u ELECTRON_RUN_AS_NODE npm run cy:e2e-headless).
- If you are not sure where the file is, run:
test -f .github/copilot-instructions.md && echo found