diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..f2dbccd --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,105 @@ +name: Test + +on: + push: + branches: + - '**' + +env: + APP_ENV: test + APP_SECRET: bafc23a0315b735289c499a886798934 + APP_DEBUG: false + DATABASE_URL: pgsql://precontentieux:precontentieux@localhost:5432/precontest?serverVersion=15 + PRECONTENTIEUX_COURRIEL_EQUIPE: equipe@precontentieux.anje-justice.test + COMPOSER_ALLOW_SUPERUSER: 1 + BASE_URL: precontentieux.test + MAILER_FROM: ne-pas-repondre@precontentieux.test + MAILER_DSN: smtp://mailpit:1025 + CORS_ALLOW_ORIGIN: "*" + EMAIL_FROM: ne-pas-repondre@precontentieux.anje-justice.test + EMAIL_FROM_LABEL: "Mon Indemnisation Justice (test)" + SYMFONY_DEPRECATIONS_HELPER: disabled + PANTHER_ERROR_SCREENSHOT_DIR: public/screenshots + PANTHER_ERROR_SCREENSHOT_ATTACH: true + +permissions: + contents: read + issues: read + checks: write + pull-requests: write + +jobs: + test: + runs-on: ubuntu-latest + services: + postgres: + image: postgres + ports: + - 5432:5432 + env: + POSTGRES_USER: precontentieux + POSTGRES_NAME: precontest + POSTGRES_HOST: postgres + POSTGRES_PASSWORD: precontentieux + POSTGRES_PORT: 5432 + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + mailpit: + image: axllent/mailpit + + steps: + - uses: actions/checkout@v4 + - uses: browser-actions/setup-firefox@v1 + - uses: actions/setup-node@v3 + with: + node-version: 18.x + - name: Cache composer dependencies + uses: actions/cache@v3 + with: + path: vendor + key: composer-${{ hashFiles('composer.lock') }} + + - uses: php-actions/composer@v6 + with: + php_version: '8.2' + php_extensions: 'zip intl calendar gd pdo pdo_pgsql pgsql' + interaction: 'no' + args: "--optimize-autoloader" + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.2' + extensions: 'zip, intl, calendarn gd, pdo, pdo_pgsql, pgsql' + + - name: Install yarn dependencies + run: yarn install + + - name: Run migration + run: bin/console doctrine:migrations:migrate --no-interaction --all-or-nothing + + - name: Detect headless browser driver + run: vendor/bin/bdi detect drivers + + - name: Running unit test + uses: php-actions/phpunit@v3 + with: + php_version: '8.2' + php_extensions: 'zip intl calendar gd pdo pdo_pgsql pgsql' + log_junit: test-result.xml + + - name: Check test result file exists + id: check_test_result_file + uses: andstor/file-existence-action@v1 + with: + files: test-result.xml + + - name: Publish Test Results + uses: EnricoMi/publish-unit-test-result-action@v2 + if: ${{ steps.check_test_result_file.outputs.files_exists == 'true' }} + with: + files: | + test-result.xml \ No newline at end of file diff --git a/README.md b/README.md index fd696f4..4262907 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# 🇫🇷 👩‍⚖️ 🤝 Précontentieux +# 🇫🇷 👩‍⚖️ 🤝 Mon Indemnisation Justice (ex Précontentieux) ## Installation diff --git a/composer.json b/composer.json index 90ecda6..289a471 100644 --- a/composer.json +++ b/composer.json @@ -9,7 +9,6 @@ "ext-iconv": "*", "acsiomatic/device-detector-bundle": "^0.5.0", "api-platform/core": "^3.2", - "clegginabox/pdf-merger": "dev-master", "doctrine/dbal": "^3", "doctrine/doctrine-bundle": "^2.12", "doctrine/doctrine-migrations-bundle": "^3.3", diff --git a/composer.lock b/composer.lock index 11aa070..dc1e2d6 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "7334195fef75e952b38038c551a122d4", + "content-hash": "81f607ac39d53792508ac5e868d91adc", "packages": [ { "name": "acsiomatic/device-detector-bundle", @@ -420,47 +420,6 @@ ], "time": "2024-10-09T08:09:09+00:00" }, - { - "name": "clegginabox/pdf-merger", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/clegginabox/pdf-merger.git", - "reference": "998997f71bc0bc82c987707899f12d3d40421b24" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/clegginabox/pdf-merger/zipball/998997f71bc0bc82c987707899f12d3d40421b24", - "reference": "998997f71bc0bc82c987707899f12d3d40421b24", - "shasum": "" - }, - "require": { - "setasign/fpdf": "^1.8", - "setasign/fpdi": "^2.2" - }, - "default-branch": true, - "type": "library", - "autoload": { - "classmap": [ - "src/PDFMerger/PDFMerger.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Paul Clegg", - "email": "paul@clegginabox.co.uk" - } - ], - "description": "PDF File Merger for PHP5", - "support": { - "source": "https://github.com/clegginabox/pdf-merger/tree/master" - }, - "time": "2024-06-21T04:59:28+00:00" - }, { "name": "doctrine/cache", "version": "2.2.0", @@ -3893,124 +3852,6 @@ ], "time": "2024-07-29T11:22:56+00:00" }, - { - "name": "setasign/fpdf", - "version": "1.8.6", - "source": { - "type": "git", - "url": "https://github.com/Setasign/FPDF.git", - "reference": "0838e0ee4925716fcbbc50ad9e1799b5edfae0a0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Setasign/FPDF/zipball/0838e0ee4925716fcbbc50ad9e1799b5edfae0a0", - "reference": "0838e0ee4925716fcbbc50ad9e1799b5edfae0a0", - "shasum": "" - }, - "require": { - "ext-gd": "*", - "ext-zlib": "*" - }, - "type": "library", - "autoload": { - "classmap": [ - "fpdf.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Olivier Plathey", - "email": "oliver@fpdf.org", - "homepage": "http://fpdf.org/" - } - ], - "description": "FPDF is a PHP class which allows to generate PDF files with pure PHP. F from FPDF stands for Free: you may use it for any kind of usage and modify it to suit your needs.", - "homepage": "http://www.fpdf.org", - "keywords": [ - "fpdf", - "pdf" - ], - "support": { - "source": "https://github.com/Setasign/FPDF/tree/1.8.6" - }, - "time": "2023-06-26T14:44:25+00:00" - }, - { - "name": "setasign/fpdi", - "version": "v2.6.1", - "source": { - "type": "git", - "url": "https://github.com/Setasign/FPDI.git", - "reference": "09a816004fcee9ed3405bd164147e3fdbb79a56f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Setasign/FPDI/zipball/09a816004fcee9ed3405bd164147e3fdbb79a56f", - "reference": "09a816004fcee9ed3405bd164147e3fdbb79a56f", - "shasum": "" - }, - "require": { - "ext-zlib": "*", - "php": "^5.6 || ^7.0 || ^8.0" - }, - "conflict": { - "setasign/tfpdf": "<1.31" - }, - "require-dev": { - "phpunit/phpunit": "~5.7", - "setasign/fpdf": "~1.8.6", - "setasign/tfpdf": "~1.33", - "squizlabs/php_codesniffer": "^3.5", - "tecnickcom/tcpdf": "~6.2" - }, - "suggest": { - "setasign/fpdf": "FPDI will extend this class but as it is also possible to use TCPDF or tFPDF as an alternative. There's no fixed dependency configured." - }, - "type": "library", - "autoload": { - "psr-4": { - "setasign\\Fpdi\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jan Slabon", - "email": "jan.slabon@setasign.com", - "homepage": "https://www.setasign.com" - }, - { - "name": "Maximilian Kresse", - "email": "maximilian.kresse@setasign.com", - "homepage": "https://www.setasign.com" - } - ], - "description": "FPDI is a collection of PHP classes facilitating developers to read pages from existing PDF documents and use them as templates in FPDF. Because it is also possible to use FPDI with TCPDF, there are no fixed dependencies defined. Please see suggestions for packages which evaluates the dependencies automatically.", - "homepage": "https://www.setasign.com/fpdi", - "keywords": [ - "fpdf", - "fpdi", - "pdf" - ], - "support": { - "issues": "https://github.com/Setasign/FPDI/issues", - "source": "https://github.com/Setasign/FPDI/tree/v2.6.1" - }, - "funding": [ - { - "url": "https://tidelift.com/funding/github/packagist/setasign/fpdi", - "type": "tidelift" - } - ], - "time": "2024-09-02T10:17:15+00:00" - }, { "name": "symfony/apache-pack", "version": "v1.0.1", @@ -12914,9 +12755,7 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": { - "clegginabox/pdf-merger": 20 - }, + "stability-flags": {}, "prefer-stable": true, "prefer-lowest": false, "platform": { @@ -12924,6 +12763,6 @@ "ext-ctype": "*", "ext-iconv": "*" }, - "platform-dev": [], + "platform-dev": {}, "plugin-api-version": "2.6.0" }