Giter Club home page Giter Club logo

wordpress-webex's Introduction

wordpress-webex

CI Codacy Badge Codacy Badge

An open source Cisco Webex (teams) plugin for WordPress.

ToDo

Contribute

Setting the dev environment

Note: Instructions for Ubuntu 20.04

Install Nginx, PHP and WordPress

We follow Digital Ocean guide to install the wordpress. It is installed on /var/www/wordpress/.

Install GIT

Replace https://github.com/warpdev-bywarpcom/wordpress-webex.git with your fork URL.

cd /var/www/wordpress/wp-content/plugins/
git clone https://github.com/warpdev-bywarpcom/wordpress-webex.git
cd wordpress-webex

Verify git is ok:

git status

You should get:

On branch main
Your branch is up to date with 'origin/main'.

nothing to commit, working tree clean

Install PHPunit and PHP_CodeSniffer

To run tests you need the following:

sudo apt-get install subversion

Add a folder for PHPunit

mkdir ~/bin

Add this folder to the path (you can add this line to the end of the ~/.bashrc file so this is added every time you login)

export PATH="$HOME/bin:$PATH"
export PATH="$HOME/.config/composer/vendor/bin:$PATH"

Add PHPUnit version 7 (requirement for wordpress)

cd ~/bin
wget -O phpunit https://phar.phpunit.de/phpunit-7.phar
chmod +x phpunit

Verify the install phpunit --version

Should print:

PHPUnit 7.5.20 by Sebastian Bergmann and contributors.

Install composer:

curl -sS https://getcomposer.org/installer -o composer-setup.php
sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer

Add packages used to lint:

composer global require wp-coding-standards/wpcs
composer global require phpcompatibility/phpcompatibility-wp
composer global require dealerdirect/phpcodesniffer-composer-installer

Run tests

Replace root with a mysql user with permission to create DBs, and password with the password, no pun intended.

sudo bin/install-wp-tests.sh wordpress-test root password 127.0.0.1 latest
phpunit

Run lint tests (use phpcs if you don't want to fix automatically):

phpcbf --standard=WordPress .

Remove test

Replace root with the user name, and password with the user password.

rm -rf /tmp/wordpress
sudo rm -rf /tmp/wordpress-tests-lib/
sudo rm -rf /tmp/wp-latest.json
mysqladmin drop wordpress-test --user="root" --password="password"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.