Files
carpseeds.pl/wp-content/plugins/elementor-3.2.5-bck4/.circleci/config.yml
2024-07-15 11:28:08 +02:00

482 lines
11 KiB
YAML

workflows:
version: 2
#PHP-JS-Lints:
# jobs:
# - php-js-lints
#JS-Qunit:
# jobs:
# - js-qunit
#PHPUnit-PHP5.4:
# jobs:
# - php54-wp51-tests
# - php54-wp50-tests
# - php54-wp49-tests
# - php54-wp48-tests
# - php54-wp47-tests
#PHPUnit-PHP5.5:
# jobs:
# - php55-wp51-tests
# - php55-wp50-tests
# - php55-wp49-tests
# - php55-wp48-tests
# - php55-wp47-tests
#PHPUnit-PHP5.6:
# jobs:
# - php56-wp-latest-tests
# - php56-wp51-tests
# - php56-wp50-tests
# - php56-wp49-tests
# - php56-wp48-tests
# - php56-wp47-tests
#PHPUnit-PHP7.0:
# jobs:
# - php70-wp-latest-tests
# - php70-wp51-tests
# - php70-wp50-tests
# - php70-wp49-tests
# - php70-wp48-tests
# - php70-wp47-tests
#PHPUnit-PHP7.1:
# jobs:
# - php71-wp-latest-tests
# - php71-wp51-tests
# - php71-wp50-tests
# - php71-wp49-tests
# - php71-wp48-tests
# - php71-wp47-tests
#PHPUnit-PHP7.2:
# jobs:
# - php72-wp-latest-tests
# - php72-wp51-tests
# - php72-wp50-tests
# - php72-wp49-tests
# - php72-wp48-tests
# - php72-wp47-tests
#PHPUnit-PHP7.3:
# jobs:
# - php73-wp-latest-tests
# - php73-wp51-tests
# - php73-wp50-tests
Build-and-Deploy:
jobs:
- build-and-deploy:
filters:
branches:
only:
- develop
- /release\/.*/
version: 2
job-references:
mysql_image: &mysql_image
circleci/mysql:5.6
setup_environment: &setup_environment
name: "Setup Environment Variables"
command: |
echo "export PATH=$HOME/.composer/vendor/bin:$PATH" >> $BASH_ENV
if [ -f /home/circleci/.bashrc ]; then
source /home/circleci/.bashrc
fi
install_dependencies: &install_dependencies
name: "Install Dependencies"
command: |
sudo docker-php-ext-install mysqli
install_wp_core: &install_wp_core
name: "Install WordPress Core"
command: |
rm -rf /tmp/wordpress-tests-lib /tmp/wordpress
bash bin/install-wp-tests.sh wordpress_test root '' 127.0.0.1 $WP_VERSION
php_job: &php_job
environment:
- WP_VERSION: "latest"
steps:
- checkout
- run: *setup_environment
- run: *install_dependencies
- run: *install_wp_core
- run:
name: "Run PHPUnit on Single Site"
command: |
mkdir -p ~/phpunit
phpunit --coverage-clover=build/logs/clover.xml --log-junit ~/phpunit/junit.xml
- run:
name: "Run PHPUnit on Multi Site"
command: |
WP_MULTISITE=1 phpunit --coverage-clover=build/logs/clover.xml
- run:
name: "Run PHP Parallel Lint"
command: |
parallel-lint --blame --exclude node_modules --exclude vendor .
- store_test_results:
path: ~/phpunit
- store_artifacts:
path: ~/phpunit
jobs:
php54-wp51-tests:
<<: *php_job
environment:
- WP_VERSION: "5.1"
docker:
- image: pojome/php-cli:5.4
- image: *mysql_image
php54-wp50-tests:
<<: *php_job
environment:
- WP_VERSION: "5.0"
docker:
- image: pojome/php-cli:5.4
- image: *mysql_image
php54-wp49-tests:
<<: *php_job
environment:
- WP_VERSION: "4.9"
docker:
- image: pojome/php-cli:5.4
- image: *mysql_image
php54-wp48-tests:
<<: *php_job
environment:
- WP_VERSION: "4.8"
docker:
- image: pojome/php-cli:5.4
- image: *mysql_image
php54-wp47-tests:
<<: *php_job
environment:
- WP_VERSION: "4.7"
docker:
- image: pojome/php-cli:5.4
- image: *mysql_image
php55-wp51-tests:
<<: *php_job
environment:
- WP_VERSION: "5.1"
docker:
- image: pojome/php-cli:5.5
- image: *mysql_image
php55-wp50-tests:
<<: *php_job
environment:
- WP_VERSION: "5.0"
docker:
- image: pojome/php-cli:5.5
- image: *mysql_image
php55-wp49-tests:
<<: *php_job
environment:
- WP_VERSION: "4.9"
docker:
- image: pojome/php-cli:5.5
- image: *mysql_image
php55-wp48-tests:
<<: *php_job
environment:
- WP_VERSION: "4.8"
docker:
- image: pojome/php-cli:5.5
- image: *mysql_image
php55-wp47-tests:
<<: *php_job
environment:
- WP_VERSION: "4.7"
docker:
- image: pojome/php-cli:5.5
- image: *mysql_image
php56-wp-latest-tests:
<<: *php_job
docker:
- image: pojome/php-cli:5.6
- image: *mysql_image
php56-wp51-tests:
<<: *php_job
environment:
- WP_VERSION: "5.1"
docker:
- image: pojome/php-cli:5.6
- image: *mysql_image
php56-wp50-tests:
<<: *php_job
environment:
- WP_VERSION: "5.0"
docker:
- image: pojome/php-cli:5.6
- image: *mysql_image
php56-wp49-tests:
<<: *php_job
environment:
- WP_VERSION: "4.9"
docker:
- image: pojome/php-cli:5.6
- image: *mysql_image
php56-wp48-tests:
<<: *php_job
environment:
- WP_VERSION: "4.8"
docker:
- image: pojome/php-cli:5.6
- image: *mysql_image
php56-wp47-tests:
<<: *php_job
environment:
- WP_VERSION: "4.7"
docker:
- image: pojome/php-cli:5.6
- image: *mysql_image
php70-wp-latest-tests:
<<: *php_job
docker:
- image: pojome/php-cli:7.0
- image: *mysql_image
php70-wp51-tests:
<<: *php_job
environment:
- WP_VERSION: "5.1"
docker:
- image: pojome/php-cli:7.0
- image: *mysql_image
php70-wp50-tests:
<<: *php_job
environment:
- WP_VERSION: "5.0"
docker:
- image: pojome/php-cli:7.0
- image: *mysql_image
php70-wp49-tests:
<<: *php_job
environment:
- WP_VERSION: "4.9"
docker:
- image: pojome/php-cli:7.0
- image: *mysql_image
php70-wp48-tests:
<<: *php_job
environment:
- WP_VERSION: "4.8"
docker:
- image: pojome/php-cli:7.0
- image: *mysql_image
php70-wp47-tests:
<<: *php_job
environment:
- WP_VERSION: "4.7"
docker:
- image: pojome/php-cli:7.0
- image: *mysql_image
php71-wp-latest-tests:
<<: *php_job
docker:
- image: pojome/php-cli:7.1
- image: *mysql_image
php71-wp51-tests:
<<: *php_job
environment:
- WP_VERSION: "5.1"
docker:
- image: pojome/php-cli:7.1
- image: *mysql_image
php71-wp50-tests:
<<: *php_job
environment:
- WP_VERSION: "5.0"
docker:
- image: pojome/php-cli:7.1
- image: *mysql_image
php71-wp49-tests:
<<: *php_job
environment:
- WP_VERSION: "4.9"
docker:
- image: pojome/php-cli:7.1
- image: *mysql_image
php71-wp48-tests:
<<: *php_job
environment:
- WP_VERSION: "4.8"
docker:
- image: pojome/php-cli:7.1
- image: *mysql_image
php71-wp47-tests:
<<: *php_job
environment:
- WP_VERSION: "4.7"
docker:
- image: pojome/php-cli:7.1
- image: *mysql_image
php72-wp-latest-tests:
<<: *php_job
docker:
- image: pojome/php-cli:7.2
- image: *mysql_image
php72-wp51-tests:
<<: *php_job
environment:
- WP_VERSION: "5.1"
docker:
- image: pojome/php-cli:7.2
- image: *mysql_image
php72-wp50-tests:
<<: *php_job
environment:
- WP_VERSION: "5.0"
docker:
- image: pojome/php-cli:7.2
- image: *mysql_image
php72-wp49-tests:
<<: *php_job
environment:
- WP_VERSION: "4.9"
docker:
- image: pojome/php-cli:7.2
- image: *mysql_image
php72-wp48-tests:
<<: *php_job
environment:
- WP_VERSION: "4.8"
docker:
- image: pojome/php-cli:7.2
- image: *mysql_image
php72-wp47-tests:
<<: *php_job
environment:
- WP_VERSION: "4.7"
docker:
- image: pojome/php-cli:7.2
- image: *mysql_image
php73-wp-latest-tests:
<<: *php_job
docker:
- image: pojome/php-cli:7.3
- image: *mysql_image
php73-wp51-tests:
<<: *php_job
environment:
- WP_VERSION: "5.1"
docker:
- image: pojome/php-cli:7.3
- image: *mysql_image
php73-wp50-tests:
<<: *php_job
environment:
- WP_VERSION: "5.0"
docker:
- image: pojome/php-cli:7.3
- image: *mysql_image
php-js-lints:
docker:
- image: pojome/php-js-lints
steps:
- checkout
- run:
name: "Run JS lint"
command: |
mkdir -p /root/junit
eslint . -f junit > /root/junit/eslint.xml
- run:
name: "Run PHP lint"
command: |
export PATH=$HOME/.composer/vendor/bin:$PATH
phpcs --config-set installed_paths $HOME/.composer/vendor/wp-coding-standards/wpcs
phpcs -p -s -n . --standard=./ruleset.xml --extensions=php --report=gitblame --report-junit=/root/junit/phpcs.xml
- store_test_results:
path: ~/junit
- store_artifacts:
path: ~/junit
js-qunit:
docker:
- image: circleci/node:latest-browsers
steps:
- checkout
- run:
name: "Install Grunt"
command: |
sudo npm install -g grunt-cli
- run:
name: "NPM Install"
command: |
cd ~/project
npm install
- run:
name: "Grunt Scripts"
command: |
grunt scripts
- run:
name: "Run Qunit"
command: |
grunt qunit
build-and-deploy:
docker:
- image: pojome/php-js-lints
steps:
- checkout
- run:
name: "Install Dependencies"
command: |
cd ~/project
npm install
- run:
name: "Build and Deploy"
command: |
npm config set git-tag-version false
if [ "${CIRCLE_BRANCH}" == "develop" ];
then npm version patch
fi
if [[ "${CIRCLE_BRANCH:0:7}" == "release" ]];
then npm version minor
fi
export PLUGIN_VERSION=$(date '+%Y%m%d.%H%M')
export PACKAGE_VERSION=$(cat package.json \
| grep version \
| head -1 \
| awk -F: '{ print $2 }' \
| sed 's/[",]//g' \
| tr -d '[[:space:]]')
export PLUGIN_ZIP_FILENAME="elementor-${PACKAGE_VERSION}-${PLUGIN_VERSION}.zip"
grunt build
sed -i -E "s/Version: (.*?)/Version: ${PACKAGE_VERSION}-${PLUGIN_VERSION}/g" build/elementor.php
sed -i -E "s/ELEMENTOR_VERSION', '(.*?)'/ELEMENTOR_VERSION', '${PACKAGE_VERSION}-${PLUGIN_VERSION}'/g" build/elementor.php
mv build elementor
zip -r $PLUGIN_ZIP_FILENAME elementor
rsync -qr -e "ssh -o StrictHostKeyChecking=no" -r $PLUGIN_ZIP_FILENAME ${deployed_user}@${deployed_host}:${deployed_path}/$(date '+%Y-%m/') > /dev/null