From 8492f2f926a31effb801fcc96c5c684447adc7e0 Mon Sep 17 00:00:00 2001 From: Ferdinand Kuhl Date: Sat, 30 Apr 2022 21:45:57 +0200 Subject: [PATCH] Adding testing and code-style pipelines --- .woodpecker/code-style.yml | 7 ++++++ .woodpecker/test.yml | 46 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 .woodpecker/code-style.yml create mode 100644 .woodpecker/test.yml diff --git a/.woodpecker/code-style.yml b/.woodpecker/code-style.yml new file mode 100644 index 0000000..453df4b --- /dev/null +++ b/.woodpecker/code-style.yml @@ -0,0 +1,7 @@ +pipeline: + code-style: + image: composer + commands: + - composer global config repositories.repo-name vcs https://git.digital-competence.de/Packages/php-codesniffer + - composer global require digicomp/php-codesniffer:@dev + - composer global exec -- phpcs --runtime-set ignore_warnings_on_exit 1 --standard=DigiComp Classes/ Migrations/ Tests/ Resources/Private/ diff --git a/.woodpecker/test.yml b/.woodpecker/test.yml new file mode 100644 index 0000000..cd71c34 --- /dev/null +++ b/.woodpecker/test.yml @@ -0,0 +1,46 @@ +workspace: + base: /woodpecker + path: package + +matrix: + FLOW_VERSION: + - 4.3 + - 5.3 + +pipeline: + functional-tests: + image: thecodingmachine/php:7.4-v4-cli + environment: + # Enable the PDO_SQLITE extension + - "PHP_EXTENSION_PDO_SQLITE=1" + - "FLOW_VERSION=${FLOW_VERSION}" + - "NEOS_BUILD_DIR=/woodpecker/Build-${FLOW_VERSION}" + commands: + - "sudo mkdir $NEOS_BUILD_DIR" + - "sudo chown -R docker:docker $NEOS_BUILD_DIR" + - "cd $NEOS_BUILD_DIR" + - "if [ \"$FLOW_VERSION\" = \"4.3\" ]; then sudo composer self-update --1; fi" + - "composer create-project --no-install neos/flow-base-distribution:^$FLOW_VERSION ." + - "composer config repositories.repo-name path /woodpecker/package" + - "composer remove --dev neos/behat" + - "if [ \"$FLOW_VERSION\" = \"4.3\" ]; then composer require typo3fluid/fluid:2.4.3; fi" + - "composer require digicomp/sequence:@dev" + - | + if [ "$FLOW_VERSION" = "4.3" ]; then + echo 'Neos: + Flow: + persistence: + backendOptions: + dbname: "flow_functional_testing" + error: + errorHandler: + exceptionalErrors: + 0: "%E_USER_ERROR%" + 1: "%E_RECOVERABLE_ERROR%" + 2: ~ + 3: "%E_NOTICE%" + 4: "%E_USER_WARNING%" + 5: "%E_USER_NOTICE%" + 6: "%E_STRICT%"' > Configuration/Testing/Settings.yaml + fi + - "bin/phpunit --configuration Build/BuildEssentials/PhpUnit/FunctionalTests.xml Packages/Application/DigiComp.Sequence/Tests/Functional"