From 89bbc322b7c0fa694fa9272621d457b23ed97b98 Mon Sep 17 00:00:00 2001 From: Gato Date: Sun, 7 Jun 2026 11:15:15 +0200 Subject: [PATCH] Changement ci sans test Signed-off-by: Gato --- .gitea/workflows/ci.yml | 56 ++++++++++++++++++++--------------------- .githooks/pre-push | 22 ---------------- 2 files changed, 28 insertions(+), 50 deletions(-) delete mode 100755 .githooks/pre-push diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index c11c69f..f50249a 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -8,37 +8,37 @@ on: pull_request: jobs: - test: - name: Tests - runs-on: ubuntu-latest - services: - postgres: - image: postgres:16 - env: - POSTGRES_DB: olhar_test - POSTGRES_USER: olhar - POSTGRES_PASSWORD: olhar - ports: - - 5432:5432 + # test: + # name: Tests + # runs-on: ubuntu-latest + # services: + # postgres: + # image: postgres:16 + # env: + # POSTGRES_DB: olhar_test + # POSTGRES_USER: olhar + # POSTGRES_PASSWORD: olhar + # ports: + # - 5432:5432 - steps: - - name: Checkout - uses: actions/checkout@v4 + # steps: + # - name: Checkout + # uses: actions/checkout@v4 - - name: Build image de test - run: docker build -f Dockerfile.test -t olhar-api-test:ci . + # - name: Build image de test + # run: docker build -f Dockerfile.test -t olhar-api-test:ci . - - name: Lancer les tests - run: | - docker run --rm \ - --network host \ - -e SPRING_DATASOURCE_URL=jdbc:postgresql://localhost:5432/olhar_test \ - -e SPRING_DATASOURCE_USERNAME=olhar \ - -e SPRING_DATASOURCE_PASSWORD=olhar \ - -e SPRING_DATASOURCE_DRIVER_CLASS_NAME=org.postgresql.Driver \ - -e SECURITY_JWT_SECRET=test-secret-key-for-ci-testing-only-must-be-long-enough \ - olhar-api-test:ci \ - ./gradlew test --no-daemon + # - name: Lancer les tests + # run: | + # docker run --rm \ + # --network host \ + # -e SPRING_DATASOURCE_URL=jdbc:postgresql://localhost:5432/olhar_test \ + # -e SPRING_DATASOURCE_USERNAME=olhar \ + # -e SPRING_DATASOURCE_PASSWORD=olhar \ + # -e SPRING_DATASOURCE_DRIVER_CLASS_NAME=org.postgresql.Driver \ + # -e SECURITY_JWT_SECRET=test-secret-key-for-ci-testing-only-must-be-long-enough \ + # olhar-api-test:ci \ + # ./gradlew test --no-daemon build-and-push: name: Build & push image Docker diff --git a/.githooks/pre-push b/.githooks/pre-push deleted file mode 100755 index e386afc..0000000 --- a/.githooks/pre-push +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -REPO_ROOT=$(git rev-parse --show-toplevel) -BRANCH=$(git symbolic-ref --short HEAD) - -echo "🔄 Pre-push : synchronisation avec origin/$BRANCH..." -if ! git pull --rebase origin "$BRANCH"; then - echo "❌ git pull --rebase a Ă©chouĂ© — rĂ©sous les conflits avant de pousser" - exit 1 -fi - -echo "🐳 Pre-push : build de l'image Docker de production..." -VERSION=$(grep '^version' "$REPO_ROOT/build.gradle" | awk -F"'" '{print $2}') -IMAGE="git.goutailler-olivier.com/gato/olhar-api:$VERSION" - -if podman build -f "$REPO_ROOT/Dockerfile" -t "$IMAGE" "$REPO_ROOT"; then - echo "✅ Build Docker rĂ©ussi ($IMAGE)" -else - echo "❌ Build Docker Ă©chouĂ© — push annulĂ©" - exit 1 -fi