add CI quality gates
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
name: Quality gates
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
test-build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
cache: npm
|
||||
- run: npm ci
|
||||
- run: npm test
|
||||
- run: npm run build
|
||||
|
||||
container:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Build production image
|
||||
run: docker build --tag ihaleist:ci .
|
||||
- name: Validate nginx configuration
|
||||
run: docker run --rm ihaleist:ci nginx -t
|
||||
- name: Validate container health
|
||||
run: |
|
||||
set -eu
|
||||
cid=$(docker run -d -p 18080:80 -e NODE_ENV=production -e AUTH_SECRET=$(openssl rand -hex 32) ihaleist:ci)
|
||||
cleanup() { docker rm -f "$cid" >/dev/null 2>&1 || true; }
|
||||
trap cleanup EXIT
|
||||
for attempt in $(seq 1 30); do
|
||||
if curl --fail --silent http://127.0.0.1:18080/api/health; then exit 0; fi
|
||||
sleep 1
|
||||
done
|
||||
echo 'Container health endpoint did not become ready' >&2
|
||||
exit 1
|
||||
@@ -2082,3 +2082,7 @@ Doğrulama: 289 test geçti, Vite üretim derlemesi başarılı. Host ortamında
|
||||
Docker runtime image’ında backend’in kullandığı ortak `src/` klasörünün eksik kopyalandığı bulundu ve Dockerfile’a eklendi; önceki image Node `ERR_MODULE_NOT_FOUND` nedeniyle 502 üretiyordu. Yeniden build sonrası `nginx -t` başarılı, `/api/health` 200 ve statik güvenlik başlıkları doğrulandı. Kanıt [`qa-container-runtime.json`](evidence/qa-container-runtime.json) içinde.
|
||||
|
||||
İlk container doğrulamasında runtime npm audit, `@huggingface/transformers` üzerinden `sharp` için iki yüksek önem dereceli ve otomatik düzeltmesi olmayan uyarı bildirdi. Dockerfile semantic embedding paketini artık varsayılan olarak kurmuyor (`ENABLE_SEMANTIC_MATCH=1` ile açıkça opt-in); varsayılan image audit sonucu 0 açık ve `UYUM_GOMME=0`. Embedding açılacaksa ayrı güvenlik incelemesi ve bağımlılık yükseltmesi gerekir.
|
||||
|
||||
### 2026-09-06 · CI kalite kapıları
|
||||
|
||||
GitHub Actions iş akışı eklendi. Her push ve pull request’te test/üretim derlemesi; ayrıca Docker image build’i, nginx yapılandırma testi ve `/api/health` çalışma zamanı kontrolü otomatik çalışacak. Bu iş akışı gerçek production rollout kanıtının yerine geçmez.
|
||||
|
||||
Reference in New Issue
Block a user