test: pytest (auth, RBAC, endpoints) + étape CI build->test->push
Build & Deploy / build (push) Successful in 11s

This commit is contained in:
neckfire
2026-06-20 12:57:30 +02:00
parent 8563e6daac
commit af00ab36cc
4 changed files with 116 additions and 2 deletions
+9 -2
View File
@@ -15,11 +15,18 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Build & push image
- name: Build image
run: docker build -t "${IMAGE}:latest" -t "${IMAGE}:${GITHUB_SHA::12}" .
- name: Tests (pytest dans l'image, BDD simulée)
run: |
docker run --rm "${IMAGE}:${GITHUB_SHA::12}" \
sh -c 'pip install -q pytest httpx && pytest -q'
- name: Push image
run: |
set -e
echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login git.nfteam.ovh -u "${{ secrets.REGISTRY_USER }}" --password-stdin
docker build -t "${IMAGE}:latest" -t "${IMAGE}:${GITHUB_SHA::12}" .
docker push --all-tags "${IMAGE}"
echo "pushed ${IMAGE}"