mirror of
https://github.com/azaion/admin.git
synced 2026-06-21 10:21:10 +00:00
c7b297de83
- Deleted the deploy.cmd script as it was no longer needed. - Updated Dockerfile to include curl for health checks and added a non-root user for improved security. - Modified health check command to use curl for better reliability. - Adjusted docker-compose.test.yml to reflect changes in health check configuration. - Cleaned up appsettings.json and removed unused configuration properties. - Removed Resource entity and related requests from the codebase as part of the architectural shift. - Updated documentation to reflect the removal of hardware binding and related endpoints. Co-authored-by: Cursor <cursoragent@cursor.com>
55 lines
2.0 KiB
YAML
55 lines
2.0 KiB
YAML
when:
|
|
event: [push, pull_request, manual]
|
|
branch: [dev, stage, main]
|
|
|
|
matrix:
|
|
include:
|
|
- PLATFORM: arm64
|
|
TAG_SUFFIX: arm
|
|
# - PLATFORM: amd64
|
|
# TAG_SUFFIX: amd
|
|
|
|
labels:
|
|
platform: ${PLATFORM}
|
|
|
|
steps:
|
|
- name: lint-format
|
|
image: mcr.microsoft.com/dotnet/sdk:10.0
|
|
commands:
|
|
- dotnet format Azaion.AdminApi.sln --verify-no-changes --verbosity diagnostic
|
|
|
|
- name: unit-tests
|
|
image: mcr.microsoft.com/dotnet/sdk:10.0
|
|
commands:
|
|
- dotnet restore Azaion.AdminApi.sln
|
|
- dotnet test Azaion.AdminApi.sln --no-restore --configuration Release --logger "console;verbosity=normal" --logger "trx;LogFileName=test-results.trx" --results-directory /app/test-results
|
|
|
|
- name: deps-audit
|
|
image: mcr.microsoft.com/dotnet/sdk:10.0
|
|
commands:
|
|
# Security audit recommendation 13: fail the build on any High or Critical
|
|
# vulnerable dependency. The grep returns non-zero when no match is found,
|
|
# which we want to treat as success — hence the explicit inversion.
|
|
- dotnet restore Azaion.AdminApi.sln
|
|
- dotnet list Azaion.AdminApi.sln package --vulnerable --include-transitive 2>&1 | tee deps-audit.log
|
|
- if grep -E "^\s+>\s+\S+\s+\S+\s+\S+\s+(High|Critical)\s*$" deps-audit.log; then echo "Vulnerable High/Critical dependency found"; exit 1; fi
|
|
|
|
- name: e2e-tests
|
|
image: docker
|
|
commands:
|
|
# Mirrors scripts/run-tests.sh: drop volumes from any prior run so the DB
|
|
# init scripts re-run on a clean data dir, then run compose to completion.
|
|
- docker compose -f docker-compose.test.yml down -v --remove-orphans
|
|
- docker compose -f docker-compose.test.yml up --build --abort-on-container-exit --exit-code-from e2e-consumer
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
|
|
- name: e2e-cleanup
|
|
image: docker
|
|
when:
|
|
status: [success, failure]
|
|
commands:
|
|
- docker compose -f docker-compose.test.yml down -v --remove-orphans
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|