Drop docker-compose from dev workflow; run full build/test and Aspire locally
dev-build.sh now builds the whole solution and runs .NET + Jest unit tests instead of restarting docker-compose services. readme documents the aspire run command for local orchestration; slnx solution-items reference to the removed docker-compose.yml is gone.
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
<File Path=".editorconfig" />
|
||||
<File Path=".gitignore" />
|
||||
<File Path="CLAUDE.md" />
|
||||
<File Path="docker-compose.yml" />
|
||||
<File Path="readme.md" />
|
||||
</Folder>
|
||||
<Folder Name="/src/">
|
||||
|
||||
34
dev-build.sh
34
dev-build.sh
@@ -3,27 +3,19 @@ set -e
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
|
||||
build_api() {
|
||||
echo "Building API..."
|
||||
dotnet publish "$SCRIPT_DIR/src/api/MicCheck.Api/MicCheck.Api.csproj" -c Release -o "$SCRIPT_DIR/src/api/MicCheck.Api/publish"
|
||||
docker compose -f "$SCRIPT_DIR/docker-compose.yml" restart api
|
||||
echo "API done."
|
||||
}
|
||||
echo "Building solution..."
|
||||
dotnet build "$SCRIPT_DIR/MicCheck.slnx"
|
||||
|
||||
build_admin() {
|
||||
echo "Building admin..."
|
||||
echo "Installing admin dependencies..."
|
||||
npm --prefix "$SCRIPT_DIR/src/admin" ci --silent
|
||||
npm --prefix "$SCRIPT_DIR/src/admin" run build
|
||||
docker compose -f "$SCRIPT_DIR/docker-compose.yml" restart admin
|
||||
echo "Admin done."
|
||||
}
|
||||
|
||||
case "${1:-all}" in
|
||||
api) build_api ;;
|
||||
admin) build_admin ;;
|
||||
all) build_api && build_admin ;;
|
||||
*)
|
||||
echo "Usage: $0 [api|admin|all]"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
echo "Building admin..."
|
||||
npm --prefix "$SCRIPT_DIR/src/admin" run build
|
||||
|
||||
echo "Running .NET unit tests..."
|
||||
dotnet test "$SCRIPT_DIR/tests/api/MicCheck.Api.Tests.Unit/MicCheck.Api.Tests.Unit.csproj"
|
||||
|
||||
echo "Running Jest tests..."
|
||||
npm --prefix "$SCRIPT_DIR/src/admin" test
|
||||
|
||||
echo "Build and tests complete."
|
||||
|
||||
@@ -29,10 +29,11 @@ Code in the API is organized by feature area (e.g. `Features`, `Segments`, `Iden
|
||||
|
||||
## Running locally
|
||||
|
||||
`docker-compose.yml` provides supporting services. `MicCheck.AppHost` (.NET Aspire) orchestrates the API and admin app for local development.
|
||||
`MicCheck.AppHost` (.NET Aspire) orchestrates the API, admin app, and supporting services for local development.
|
||||
|
||||
```sh
|
||||
./dev-build.sh
|
||||
aspire run --project src/MicCheck.AppHost
|
||||
```
|
||||
|
||||
## Testing
|
||||
|
||||
Reference in New Issue
Block a user