Skip to Content
Development InfrastructureBuilding and Testing

Building and Testing

Build the backend, and the two test tiers.

Backend

dotnet restore src/PlatformX.sln
dotnet build src/PlatformX.sln

A change is not finished until the solution builds.

Two test tiers

TierNeedsRun it with
UnitNothing. No database, no Docker../.github/scripts/run-unit-tier.sh
EngineDocker. Runs against SQL Server and against PostgreSQL.src/Tests/run-docker-tests.sh and src/Tests/run-docker-tests-postgres.sh

Run the unit tier before pushing. It is the script CI runs, and it tolerates no failure.

A test fixture that needs a database carries [Category("RequiresDatabase")]. Without it the unit tier runs the fixture and fails.

A pull request that changes only documentation runs neither tier.

Two database engines

The engine is chosen with PLATFORMX_DB_ENGINE (SqlServer or Postgres). Data access uses Dapper; there is no Entity Framework. A repository has an interface, a SQL Server implementation and a PostgreSQL implementation, and services depend on the interface.

Portal

Use bun run <script>. Bare bun test and bun build are Bun’s own commands and bypass the package scripts.

bun run type-check && bun run lint && bun run format:check && bun run stylelint && bun run test

The CI job named “Lint” runs eslint, prettier and stylelint. All three have to pass.