React CI Standard
Nexa standard
Section titled “Nexa standard”nexa-web uses Vitest, not Jest. Component tests use @testing-library/react, @testing-library/user-event, and jsdom where a browser-like DOM is required.
Biome 2.5.3 is the only approved formatter and linter. The shared workflow runs @biomejs/biome@2.5.3 check .; repositories do not add Prettier or ESLint checks.
Required stages
Section titled “Required stages”npm ciusing the committed lock file.biome format ..biome lint .with the approved warnings policy.tsc --noEmitor the repository’s equivalent strict type check.- Vitest unit/component tests.
- Vitest coverage in LCOV for SonarQube and human review.
- SonarQube analysis.
- Semgrep, Gitleaks, and Trivy filesystem/config scan.
- Multi-stage Docker build and final runtime-image scan.
- Syft SBOM, Cosign signing where required, and multi-registry publication.
React-specific expectations
Section titled “React-specific expectations”Tests exercise user-observable behavior rather than component implementation details. Testing Library queries prefer roles, labels, and accessible names. user-event is preferred for interactions that should resemble browser behavior. API clients and shared contracts remain typed. Production builds fail on unresolved TypeScript errors.
No frontend secret is embedded through build-time environment variables. Browser configuration is considered publicly inspectable.
Current Nexa test boundaries
Section titled “Current Nexa test boundaries”- Source CI gate: Vitest unit/component tests and SonarQube coverage.
- Current browser flows: custom
.mjsbrowser/E2E flows where already implemented. - Post-deployment target standard: Playwright with Allure reporting against deployed Dev/Test environments.
- API/contract suites: run against deployed services and remain outside the source-image merge gate.
Example caller
Section titled “Example caller”jobs: ci: uses: dataready-ai/nexa-ci/.github/workflows/react-ci.yml@v1 with: node-version: '24' test-command: npm run test:unit coverage-command: npm run test:coverage image-name: nexa-web dockerfile: Dockerfile docker-context: . ecr-repository: aws-iac-nexa-web acr-repository: nexa-web spcs-repository: NEXA_WEB_REPO sonar-project-key: nexa-web secrets: inherit