diff --git a/console/InitCreatePlugin.php b/console/InitCreatePlugin.php index 7ae4b92..c4cb5d8 100644 --- a/console/InitCreatePlugin.php +++ b/console/InitCreatePlugin.php @@ -39,5 +39,7 @@ public function makeStubs() $this->makeStub('initcreateplugin/lang.stub', 'lang/pl/lang.php'); $this->makeStub('initcreateplugin/composer.stub', 'composer.json'); $this->makeStub('initcreateplugin/gitignore.stub', '.gitignore'); + $this->makeStub('initcreateplugin/danger.stub', '.danger.php'); + $this->makeStub('initcreateplugin/gitlab-ci.stub', '.gitlab-ci.yml'); } } diff --git a/console/initcreateplugin/danger.stub b/console/initcreateplugin/danger.stub new file mode 100644 index 0000000..5c4a0d9 --- /dev/null +++ b/console/initcreateplugin/danger.stub @@ -0,0 +1,15 @@ +enableRule('dangerrules/VersionYamlUpdatedRule.php'); + +return $configMaker->getConfig(); diff --git a/console/initcreateplugin/gitlab-ci.stub b/console/initcreateplugin/gitlab-ci.stub new file mode 100644 index 0000000..d19a9f2 --- /dev/null +++ b/console/initcreateplugin/gitlab-ci.stub @@ -0,0 +1,32 @@ +include: + - component: $CI_SERVER_FQDN/operational/gitlab-ci-components/setup-project-playground@1 + inputs: + octobercms_license_key: "${PLAYGROUND_LICENSE_KEY}" + github_machine_user_token: ${GITHUB_MACHINE_USER_TOKEN} + - component: $CI_SERVER_FQDN/operational/gitlab-ci-components/rules-mr-events@1 + +Tests: + extends: + - .rules-mr-events + - .setup-project-playground + script: + - composer require {{lower_author}}/{{lower_plugin}}-plugin:dev-${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME} + - vendor/bin/pest --parallel --ci --bail + +Linter: + extends: + - .rules-mr-events + - .setup-project-playground + script: + - composer require {{lower_author}}/{{lower_plugin}}-plugin:dev-${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME} + - php artisan linter:code -b plugins/{{lower_author}}/{{lower_plugin}} + +Danger-PHP: + extends: + - .rules-mr-events + image: + name: ghcr.io/shyim/danger-php:latest + entrypoint: [""] + script: + - apk add --no-cache git + - danger ci diff --git a/updates/version.yaml b/updates/version.yaml index e6d2d03..c612dbd 100644 --- a/updates/version.yaml +++ b/updates/version.yaml @@ -36,3 +36,5 @@ - "Browsing queue jobs and failed jobs tables from backend controller" 1.10.0: - "Add InIT flavoured plugin test case, that fakes mailer, storage, etc." +1.11.0: + - "Add new stubs for create plugin"