diff --git a/.gitattributes b/.gitattributes index 3027163..71f27a5 100644 --- a/.gitattributes +++ b/.gitattributes @@ -3,7 +3,7 @@ /Tests/ export-ignore /.editorconfig export-ignore /.gitattributes export-ignore -/.gitlab-ci.yml export-ignore +/.gitignore export-ignore /codeception.dist.yml export-ignore /crowdin.yml export-ignore /rector.php export-ignore diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c0eb173..f82fad7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -90,7 +90,7 @@ jobs: && composer install --no-progress --no-ansi --no-interaction - name: Build codeception tester - run: .build/bin/codecept build + run: .Build/bin/codecept build - name: Code Quality (by PHPStan) run: composer project:phpstan diff --git a/.gitignore b/.gitignore index f312b22..4d12c2a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -.build +.Build composer.lock .php-cs-fixer.cache @@ -9,6 +9,5 @@ Build/.phpunit.cache .idea var/ -vendor/ coverage_result/ diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index e4864d5..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,154 +0,0 @@ -cache: - key: "$CI_JOB_STAGE-$CI_COMMIT_REF_NAME" - paths: - - .composer/ - - .php_cs.cache - -variables: - TYPO3_VERSION: ^13.4 - -before_script: - - apk add git --update - -stages: - - lint - - test - - documentation - -lint:cgl: - image: $CI_REGISTRY/containers/phpunit-with-php-8.2:main - stage: lint - before_script: - - composer remove typo3/cms-* --no-update - - composer install --no-progress --no-ansi --no-interaction - script: - - vendor/bin/php-cs-fixer fix --config=Build/.php-cs-fixer.dist.php -v --dry-run --using-cache=no --path-mode=intersection ./ - - vendor/bin/typoscript-lint -c Build/typoscriptlint.yaml Configuration - -lint:yaml: - stage: lint - image: python:alpine3.7 - before_script: - - pip install yamllint==1.10.0 - script: - - yamllint -c Build/yamllint.yaml Configuration/ Resources/ - -.lint_php: &lint_php - stage: lint - image: $CONTAINER_IMAGE - script: - - find *.php Classes Configuration Tests -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l - -lint:php82: - <<: *lint_php - variables: - CONTAINER_IMAGE: php:8.2-alpine - -lint:php83: - <<: *lint_php - variables: - CONTAINER_IMAGE: php:8.3-alpine - -lint:php84: - <<: *lint_php - variables: - CONTAINER_IMAGE: php:8.4-alpine - -phpstan:analyse: - image: $CI_REGISTRY/containers/phpunit-with-php-8.2:main - stage: lint - before_script: - - sed -i -e "s#ssh://git@code.extco.de:22722#https://gitlab-ci-token:$CI_JOB_TOKEN@code.extco.de#g" composer.json - - composer config platform.php 8.2 - - composer install --no-progress --no-ansi --no-interaction - script: - - vendor/bin/codecept build - - vendor/bin/phpstan analyse -c Build/phpstan.neon --memory-limit 256M - -.test_php: &test_php - stage: test - services: - - mysql:5 - image: $CONTAINER_IMAGE - only: - - branches - before_script: - - composer config --no-plugins allow-plugins.typo3/cms-composer-installers true - - composer config --no-plugins allow-plugins.typo3/class-alias-loader true - - composer require typo3/cms-core="${TYPO3_VERSION}" - script: - - vendor/bin/phpunit -c Build/UnitTests.xml - - typo3DatabaseDriver=pdo_sqlite vendor/bin/phpunit -d memory_limit=256M -c Build/FunctionalTests.xml - -test:php82: - <<: *test_php - variables: - CONTAINER_IMAGE: $CI_REGISTRY/containers/phpunit-with-php-8.2:main - -test:php83: - <<: *test_php - variables: - CONTAINER_IMAGE: $CI_REGISTRY/containers/phpunit-with-php-8.3:main - -test:php84: - <<: *test_php - variables: - CONTAINER_IMAGE: $CI_REGISTRY/containers/phpunit-with-php-8.4:main - -.test_codeception: &test_codeception - stage: test - image: $CONTAINER_IMAGE - only: - - branches - before_script: - - sed -i -e "s#ssh://git@code.extco.de:22722#https://gitlab-ci-token:$CI_JOB_TOKEN@code.extco.de#g" composer.json - - composer config --no-plugins allow-plugins.typo3/cms-composer-installers true - - composer config --no-plugins allow-plugins.typo3/class-alias-loader true - - composer require typo3/cms-core="${TYPO3_VERSION}" - script: - - mkdir -p .build/public/typo3temp/var/tests/acceptance-sqlite-dbs - - export typo3DatabaseDriver=pdo_sqlite - - export PROJECT_ROOT="$(pwd)" - - export INSTANCE_PATH="$(pwd)/.build/web/typo3temp/var/tests/acceptance" - - mkdir -p "$INSTANCE_PATH" - - mkdir -p "$PROJECT_ROOT/.build/web/typo3temp/var/tests/acceptance-logs/" - - vendor/bin/codecept run - artifacts: - paths: - - .build - expire_in: 1 day - when: always - -codeception:php82: - <<: *test_codeception - variables: - CONTAINER_IMAGE: $CI_REGISTRY/containers/codeception-with-php-8.2:main - -codeception:php83: - <<: *test_codeception - needs: - - codeception:php82 - variables: - CONTAINER_IMAGE: $CI_REGISTRY/containers/codeception-with-php-8.3:main - -codeception:php84: - <<: *test_codeception - needs: - - codeception:php83 - variables: - CONTAINER_IMAGE: $CI_REGISTRY/containers/codeception-with-php-8.4:main - -documentation: - stage: documentation - image: - name: ghcr.io/typo3-documentation/render-guides:latest - entrypoint: [ "" ] - script: - - mkdir -p Documentation-GENERATED-temp - - /opt/guides/entrypoint.sh --config=Documentation --no-progress --fail-on-log - before_script: [] - artifacts: - paths: - - Documentation-GENERATED-temp/ - expire_in: 1 day - when: always diff --git a/Build/phpunit.xml.dist b/Build/phpunit.xml.dist index 635a118..e7159b5 100644 --- a/Build/phpunit.xml.dist +++ b/Build/phpunit.xml.dist @@ -1,5 +1,5 @@ - + diff --git a/codeception.dist.yml b/codeception.dist.yml index 2e7c30c..1cdc7a9 100644 --- a/codeception.dist.yml +++ b/codeception.dist.yml @@ -3,7 +3,7 @@ namespace: 'Extcode\CartEvents\Tests\Acceptance\Support' paths: tests: 'Tests/Acceptance' data: 'Tests/Acceptance/Data' - output: '.build/public/typo3temp/var/tests/acceptance-reports' + output: '.Build/public/typo3temp/var/tests/acceptance-reports' support: 'Tests/Acceptance/Support' settings: @@ -13,8 +13,8 @@ extensions: enabled: - 'Codeception\Extension\RunProcess': - - 'geckodriver > .build/public/typo3temp/var/tests/acceptance-logs/geckodriver.log 2>&1' - - 'TYPO3_PATH_APP="$INSTANCE_PATH" TYPO3_PATH_ROOT="$INSTANCE_PATH" php -S 127.0.0.1:8080 -t "$INSTANCE_PATH" > .build/public/typo3temp/var/tests/acceptance-logs/php.log 2>&1' + - 'geckodriver > .Build/public/typo3temp/var/tests/acceptance-logs/geckodriver.log 2>&1' + - 'TYPO3_PATH_APP="$INSTANCE_PATH" TYPO3_PATH_ROOT="$INSTANCE_PATH" php -S 127.0.0.1:8080 -t "$INSTANCE_PATH" > .Build/public/typo3temp/var/tests/acceptance-logs/php.log 2>&1' - 'Codeception\Extension\Recorder' - diff --git a/composer.json b/composer.json index bcb9503..e833676 100644 --- a/composer.json +++ b/composer.json @@ -33,8 +33,8 @@ } }, "config": { - "bin-dir": ".build/bin", - "vendor-dir": ".build/vendor", + "bin-dir": ".Build/bin", + "vendor-dir": ".Build/vendor", "allow-plugins": { "typo3/cms-composer-installers": true, "typo3/class-alias-loader": true, @@ -46,7 +46,7 @@ "extra": { "typo3/cms": { "extension-key": "cart_events", - "web-dir": ".build/public" + "web-dir": ".Build/public" } }, "require": { @@ -78,35 +78,35 @@ }, "scripts": { "project:reinstall": [ - "rm -rf .build/ composer.lock", + "rm -rf .Build/ composer.lock", "composer update --prefer-dist --no-progress --working-dir=\"$PROJECT_ROOT\"" ], "project:cgl": [ - ".build/bin/php-cs-fixer fix --config=Build/.php-cs-fixer.dist.php -v --using-cache=no --dry-run --diff" + ".Build/bin/php-cs-fixer fix --config=Build/.php-cs-fixer.dist.php -v --using-cache=no --dry-run --diff" ], "project:cgl-fix": [ - ".build/bin/php-cs-fixer fix --config=Build/.php-cs-fixer.dist.php -v --using-cache=no" + ".Build/bin/php-cs-fixer fix --config=Build/.php-cs-fixer.dist.php -v --using-cache=no" ], "project:lint:php": [ "find *.php Classes Configuration Tests -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l" ], "project:phpstan": [ - ".build/bin/phpstan analyse -c Build/phpstan.neon --memory-limit 256M" + ".Build/bin/phpstan analyse -c Build/phpstan.neon --memory-limit 256M" ], "project:test:unit": [ - ".build/bin/phpunit -c Build/phpunit.xml.dist --testsuite unit --display-warnings --display-deprecations --display-errors" + ".Build/bin/phpunit -c Build/phpunit.xml.dist --testsuite unit --display-warnings --display-deprecations --display-errors" ], "project:test:functional": [ - ".build/bin/phpunit -c Build/phpunit.xml.dist --testsuite functional --display-warnings --display-deprecations --display-errors" + ".Build/bin/phpunit -c Build/phpunit.xml.dist --testsuite functional --display-warnings --display-deprecations --display-errors" ], "test:rector:process": [ - "vendor/bin/rector process" + ".Build/bin/rector process" ], "test:rector:process:dry-run": [ - "vendor/bin/rector process --dry-run" + ".Build/bin/rector process --dry-run" ], "test:typoscript:lint": [ - "vendor/bin/typoscript-lint -c Build/typoscriptlint.yaml Configuration" + ".Build/bin/typoscript-lint -c Build/typoscriptlint.yaml Configuration" ], "test:php": [ "@test:php:lint", diff --git a/shell.nix b/shell.nix index b12dea0..5780c4c 100644 --- a/shell.nix +++ b/shell.nix @@ -28,7 +28,7 @@ let php ]; text = '' - rm -rf .build/ composer.lock, + rm -rf .Build/ composer.lock, composer update --prefer-dist --no-progress ''; }; @@ -119,7 +119,7 @@ let ]; text = '' project-install - XDEBUG_MODE=coverage .build/bin/phpunit -c Build/phpunit.xml.dist --coverage-html=coverage_result + XDEBUG_MODE=coverage .Build/bin/phpunit -c Build/phpunit.xml.dist --coverage-html=coverage_result ''; }; @@ -136,14 +136,14 @@ let text = '' project-install - mkdir -p "$PROJECT_ROOT/.build/public/typo3temp/var/tests/acceptance" - mkdir -p "$PROJECT_ROOT/.build/public/typo3temp/var/tests/acceptance-logs" - mkdir -p "$PROJECT_ROOT/.build/public/typo3temp/var/tests/acceptance-reports" - mkdir -p "$PROJECT_ROOT/.build/public/typo3temp/var/tests/acceptance-sqlite-dbs" + mkdir -p "$PROJECT_ROOT/.Build/public/typo3temp/var/tests/acceptance" + mkdir -p "$PROJECT_ROOT/.Build/public/typo3temp/var/tests/acceptance-logs" + mkdir -p "$PROJECT_ROOT/.Build/public/typo3temp/var/tests/acceptance-reports" + mkdir -p "$PROJECT_ROOT/.Build/public/typo3temp/var/tests/acceptance-sqlite-dbs" - export INSTANCE_PATH="$PROJECT_ROOT/.build/public/typo3temp/var/tests/acceptance" + export INSTANCE_PATH="$PROJECT_ROOT/.Build/public/typo3temp/var/tests/acceptance" - .build/bin/codecept run + .Build/bin/codecept run pgrep -f "php -S" | xargs -r kill pgrep -f "geckodriver" | xargs -r kill