CICD-078 · Validate a dotnet repository
Encyclopedia · Language build toolchains · All snippets
Previous · CICD-077 · Next · CICD-079
1. Where it fits
- Placement Bash run step following checkout, or equivalent lab terminal.
- Prerequisites source repository with committed build manifest and pinned matching toolchain.
- Platforms local-linux, github-actions, gitea-actions.
2. Copy the snippet
bash
dotnet restore --locked-mode
dotnet test --no-restore --logger trx3. How it works
The shell predicate makes the expected state explicit and returns a nonzero status when it is not satisfied.
4. Verify the result
Ensure a lockfile and global.json specify the dependency and SDK policies.
Validation syntax-validated (Bash parse). Status definitions.