Skip to content
Snippets Groups Projects
Commit c9532552 authored by Krzysiek's avatar Krzysiek
Browse files

Merge branch 'devel'

parents b012c47d 0d7dab8b
No related branches found
No related tags found
1 merge request!24Feature/acceptance2
#1.10.5 #1.10.8
before_script: before_script:
- cd ${CI_PROJECT_DIR} - cd ${CI_PROJECT_DIR}
...@@ -36,8 +36,35 @@ stages: ...@@ -36,8 +36,35 @@ stages:
script: script:
- ls -l - ls -l
- php --version - php --version
- if [[ -f tests/integration/prepare.sh ]]; then sh tests/integration/prepare.sh; fi
- composer phpunit-integration - composer phpunit-integration
.template: &job-test-unit-template
<<: *job-test-template
script:
- ls -l
- php --version
- composer phpunit-unit
.template: &job-test-integration-oldphp-template
<<: *job-test-integration-template
script:
- ls -l
- php --version
- composer update --no-progress
- if [[ -f tests/integration/prepare.sh ]]; then sh tests/integration/prepare.sh; fi
- composer phpunit-integration
.template: &job-deploy-template
image: wpdesknet/amazon-svn-deploy
stage: deploy
dependencies:
- build to deploy
retry: 2
when: manual
only:
- tags
build php: build php:
image: wpdesknet/phpunit-woocommerce:0-0 image: wpdesknet/phpunit-woocommerce:0-0
stage: build stage: build
...@@ -60,38 +87,30 @@ code style test: ...@@ -60,38 +87,30 @@ code style test:
- composer phpcs - composer phpcs
unit test 0: unit test 0:
<<: *job-test-template <<: *job-test-unit-template
image: wpdesknet/phpunit-woocommerce:0-0
script:
- ls -l
- php --version
- composer phpunit-unit
integration test 0-0: integration test lastest:
<<: *job-test-integration-template <<: *job-test-integration-template
image: wpdesknet/phpunit-woocommerce:0-0
integration test 1-1: integration test php7-1 wc-1:
<<: *job-test-integration-template <<: *job-test-integration-template
image: wpdesknet/phpunit-woocommerce:1-1 image: wpdesknet/phpunit-woocommerce:1-1
integration test 2-2: integration test php7 wc-2:
<<: *job-test-integration-template <<: *job-test-integration-template
image: wpdesknet/phpunit-woocommerce:2-2 image: wpdesknet/phpunit-woocommerce:2-2
integration test 3-3: integration test php-7 wc-3:
<<: *job-test-integration-template <<: *job-test-integration-template
image: wpdesknet/phpunit-woocommerce:3-3 image: wpdesknet/phpunit-woocommerce:2-3
script:
- php --version
- phpunit --configuration phpunit-integration.xml
integration test 4-3: integration test php5-6:
<<: *job-test-integration-template <<: *job-test-integration-oldphp-template
image: wpdesknet/phpunit-woocommerce:4-3 image: wpdesknet/phpunit-woocommerce:3-0
script:
- php --version integration test php5-5:
- phpunit --configuration phpunit-integration.xml <<: *job-test-integration-oldphp-template
image: wpdesknet/phpunit-woocommerce:4-0
apigen docs: apigen docs:
image: image:
...@@ -107,23 +126,24 @@ apigen docs: ...@@ -107,23 +126,24 @@ apigen docs:
- /app/vendor/bin/apigen generate - /app/vendor/bin/apigen generate
- php /app/hooks-docs.php ${CI_PROJECT_DIR} - php /app/hooks-docs.php ${CI_PROJECT_DIR}
only: only:
- master - tags
pages: pages:
stage: deploy stage: deploy
dependencies: dependencies:
- apigen docs - apigen docs
script: script:
- rm -rf public
- mv docs/ public/ - mv docs/ public/
artifacts: artifacts:
expire_in: 1 day expire_in: 1 day
paths: paths:
- public - public
only: only:
- master - tags
build to deploy: build to deploy:
image: wpdesknet/phpunit-woocommerce:0-0 image: wpdesknet/phpunit-woocommerce:4-0
stage: pre-deploy stage: pre-deploy
artifacts: artifacts:
expire_in: 1 month expire_in: 1 month
...@@ -134,14 +154,14 @@ build to deploy: ...@@ -134,14 +154,14 @@ build to deploy:
script: script:
- php --version - php --version
- ls -l - ls -l
- /tmp/set_version.sh ${CI_COMMIT_REF_NAME}
- rm -rf ${CI_PROJECT_DIR}/release ${CI_PROJECT_DIR}/release.zip /tmp/release - rm -rf ${CI_PROJECT_DIR}/release ${CI_PROJECT_DIR}/release.zip /tmp/release
- mkdir /tmp/release - mkdir /tmp/release
- mkdir ${CI_PROJECT_DIR}/release - mkdir -p ${CI_PROJECT_DIR}/release/${CI_PROJECT_NAME}
- mkdir ${CI_PROJECT_DIR}/release/${CI_PROJECT_NAME}
- cp -rf ${CI_PROJECT_DIR}/* /tmp/release - cp -rf ${CI_PROJECT_DIR}/* /tmp/release
- cp -rf /tmp/release/* ${CI_PROJECT_DIR}/release/${CI_PROJECT_NAME} - cp -rf /tmp/release/* ${CI_PROJECT_DIR}/release/${CI_PROJECT_NAME}
- cd ${CI_PROJECT_DIR}/release/${CI_PROJECT_NAME} - cd ${CI_PROJECT_DIR}/release/${CI_PROJECT_NAME}
# - composer install --no-dev --no-progress - composer install --no-dev --no-progress
- rm -rf build-coverage release tests docs .git .editorconfig .gitignore .gitlab-ci.yml apigen.neon \ - rm -rf build-coverage release tests docs .git .editorconfig .gitignore .gitlab-ci.yml apigen.neon \
composer.json composer.lock phpcs.xml.dist phpunit-integration.xml phpunit-unit.xml composer.phar wp-cli.phar composer.json composer.lock phpcs.xml.dist phpunit-integration.xml phpunit-unit.xml composer.phar wp-cli.phar
- cd ../ - cd ../
...@@ -150,37 +170,30 @@ build to deploy: ...@@ -150,37 +170,30 @@ build to deploy:
- tags - tags
deploy to shop: deploy to shop:
image: wpdesknet/amazon-svn-deploy <<: *job-deploy-template
stage: deploy
dependencies:
- build to deploy
retry: 2
script: script:
- ls -l
- /tmp/deploy_shop.sh ${CI_PROJECT_NAME} release.zip ${CI_PROJECT_NAME}.zip - /tmp/deploy_shop.sh ${CI_PROJECT_NAME} release.zip ${CI_PROJECT_NAME}.zip
- 'curl -X POST --data-urlencode "payload={\"text\": \"Projekt <https://gitlab.com/wpdesk/${CI_PROJECT_NAME}|${CI_PROJECT_NAME}> zdeployowany do sklepu w wersji ${CI_COMMIT_REF_NAME}\", }" https://hooks.slack.com/services/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' - 'curl -X POST --data-urlencode "payload={\"text\": \"Projekt <https://gitlab.com/wpdesk/${CI_PROJECT_NAME}|${CI_PROJECT_NAME}> zdeployowany do sklepu w wersji ${CI_COMMIT_REF_NAME}\", }" https://hooks.slack.com/services/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'
only:
- tags
environment: environment:
name: wpdesk shop name: wpdesk shop
url: https://wpdeskplugin.s3.amazonaws.com/${CI_PROJECT_NAME}.zip url: https://wpdeskplugin.s3.amazonaws.com/${CI_PROJECT_NAME}.zip
when: manual
deploy to demo:
<<: *job-deploy-template
script:
- /tmp/deploy_demo.sh release/${CI_PROJECT_NAME} ${CI_PROJECT_NAME}
- 'curl -X POST --data-urlencode "payload={\"text\": \"Projekt <https://gitlab.com/wpdesk/${CI_PROJECT_NAME}|${CI_PROJECT_NAME}> zdeployowany do demo w wersji ${CI_COMMIT_REF_NAME}\", }" https://hooks.slack.com/services/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'
environment:
name: wpdesk demo
url: https://demo.wpdesk.org
deploy to repository: deploy to repository:
image: wpdesknet/amazon-svn-deploy <<: *job-deploy-template
stage: deploy
dependencies:
- build to deploy
retry: 2
script: script:
- ls -l
- rm -rf /tmp/svn-repository - rm -rf /tmp/svn-repository
- mkdir /tmp/svn-repository - mkdir /tmp/svn-repository
- /tmp/deploy_repository.sh ${CI_PROJECT_NAME} release/${CI_PROJECT_NAME} /tmp/svn-repository - /tmp/deploy_repository.sh ${CI_PROJECT_NAME} release/${CI_PROJECT_NAME} /tmp/svn-repository
- 'curl -X POST --data-urlencode "payload={\"text\": \"Projekt <https://gitlab.com/wpdesk/${CI_PROJECT_NAME}|${CI_PROJECT_NAME}> zdeployowany do repozytorium WP w wersji ${CI_COMMIT_REF_NAME}\", }" https://hooks.slack.com/services/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' - 'curl -X POST --data-urlencode "payload={\"text\": \"Projekt <https://gitlab.com/wpdesk/${CI_PROJECT_NAME}|${CI_PROJECT_NAME}> zdeployowany do repozytorium WP w wersji ${CI_COMMIT_REF_NAME}\", }" https://hooks.slack.com/services/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'
only:
- tags
environment: environment:
name: wordpress repository name: wordpress repository
url: https://downloads.wordpress.org/plugin/${CI_PROJECT_NAME}.${CI_COMMIT_REF_NAME}.zip url: https://downloads.wordpress.org/plugin/${CI_PROJECT_NAME}.${CI_COMMIT_REF_NAME}.zip
when: manual
\ No newline at end of file
...@@ -4,9 +4,12 @@ if ( ! defined( 'ABSPATH' ) ) { ...@@ -4,9 +4,12 @@ if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} // Exit if accessed directly } // Exit if accessed directly
if ( !interface_exists( 'WPDesk_Plugin_Factory_1_10' ) ) {
interface WPDesk_Plugin_Factory_1_10 { interface WPDesk_Plugin_Factory_1_10 {
const WPDESK_FILTER_PLUGIN_CLASS = 'wpdesk_plugin_class'; const WPDESK_FILTER_PLUGIN_CLASS = 'wpdesk_plugin_class';
static function build_plugin(); static function build_plugin();
static function get_plugin_instance(); static function get_plugin_instance();
} }
}
\ No newline at end of file
...@@ -10,17 +10,14 @@ ...@@ -10,17 +10,14 @@
"php": ">=5.5" "php": ">=5.5"
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "^6", "phpunit/phpunit": "*",
"wp-coding-standards/wpcs": "^0.14.1", "wp-coding-standards/wpcs": "^0.14.1",
"squizlabs/php_codesniffer": "^3.0.2", "squizlabs/php_codesniffer": "^3.0.2",
"mockery/mockery": "^1.0", "mockery/mockery": "*",
"10up/wp_mock": "^0.3", "10up/wp_mock": "*",
"wimg/php-compatibility": "^8" "wimg/php-compatibility": "^8"
}, },
"autoload-dev": { "autoload-dev": {
"psr-4": {
"JpkTest\\": "tests"
}
}, },
"scripts": { "scripts": {
"test": "echo composer is alive", "test": "echo composer is alive",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment