From 2e95617f025a3c566f25c27d683b4966bcde4179 Mon Sep 17 00:00:00 2001 From: Serreau Jovann Date: Fri, 30 Jan 2026 17:59:15 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(workflow):=20Ajoute=20job=20de?= =?UTF-8?q?=20tests=20et=20d=C3=A9pendance=20au=20d=C3=A9ploiement=20pour?= =?UTF-8?q?=20tester=20avant.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/install-deps.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/.gitea/workflows/install-deps.yml b/.gitea/workflows/install-deps.yml index af7e70e..a6a69e8 100644 --- a/.gitea/workflows/install-deps.yml +++ b/.gitea/workflows/install-deps.yml @@ -14,8 +14,35 @@ permissions: id-token: write jobs: + test: + name: ๐Ÿงช Run Tests + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.4' + extensions: ctype, iconv, dom, libxml, zip, pdo, pdo_sqlite, intl + + - name: Install Dependencies + run: composer install --prefer-dist --no-progress + + - name: Prepare Test Database + run: | + mkdir -p var + echo 'DATABASE_URL="sqlite:///%kernel.project_dir%/var/test.db"' > .env.test.local + php bin/console doctrine:database:create --env=test --if-not-exists + php bin/console doctrine:schema:update --force --env=test + + - name: Run PHPUnit + run: php bin/phpunit + deploy: name: ๐Ÿš€ Deploy to Production + needs: test # Le job ne se lance que pour le cron ou manuellement, pas au push if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' runs-on: ubuntu-latest