Setup code quality and tests
This commit is contained in:
49
.circleci/config.yml
Normal file
49
.circleci/config.yml
Normal file
@ -0,0 +1,49 @@
|
||||
workflows:
|
||||
version: 2
|
||||
main:
|
||||
jobs:
|
||||
- php74-build
|
||||
|
||||
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
|
||||
source /home/circleci/.bashrc
|
||||
|
||||
install_dependencies: &install_dependencies
|
||||
name: "Install Dependencies"
|
||||
command: |
|
||||
sudo apt-get update && sudo apt-get install subversion
|
||||
sudo -E docker-php-ext-install mysqli
|
||||
sudo sh -c "printf '\ndeb http://ftp.us.debian.org/debian sid main\n' >> /etc/apt/sources.list"
|
||||
sudo apt-get update && sudo apt-get install mysql-client-5.7
|
||||
|
||||
php_job: &php_job
|
||||
environment:
|
||||
- WP_TESTS_DIR: "/tmp/wordpress-tests-lib"
|
||||
- WP_CORE_DIR: "/tmp/wordpress/"
|
||||
steps:
|
||||
- checkout
|
||||
- run: *setup_environment
|
||||
- run: *install_dependencies
|
||||
- run:
|
||||
name: "Run Tests"
|
||||
command: |
|
||||
composer install
|
||||
# vendor/bin/phpcs
|
||||
rm -rf $WP_TESTS_DIR $WP_CORE_DIR
|
||||
bash bin/install-wp-tests.sh wordpress_test root '' 127.0.0.1 latest
|
||||
phpunit
|
||||
|
||||
jobs:
|
||||
php74-build:
|
||||
<<: *php_job
|
||||
docker:
|
||||
- image: circleci/php:7.4
|
||||
- image: *mysql_image
|
Reference in New Issue
Block a user