Skip to content

Commit

Permalink
Update GitHub action
Browse files Browse the repository at this point in the history
  • Loading branch information
junaidbhura committed Nov 22, 2019
1 parent 3ffa8f5 commit a7b4443
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 60 deletions.
56 changes: 0 additions & 56 deletions .circleci/config.yml

This file was deleted.

38 changes: 35 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,46 @@ jobs:
build:

runs-on: ubuntu-latest
container:
image: php:7.2-apache
services:
mysql:
image: mysql:5.7.27
env:
MYSQL_ROOT_PASSWORD: root
ports:
- 3306
volumes:
- $HOME/mysql:/var/lib/mysql

steps:
- uses: actions/checkout@v1

- name: Install dependencies
run: |
apt-get update
apt-get install -y gnupg libfreetype6-dev libjpeg62-turbo-dev libmcrypt-dev libicu-dev git subversion default-mysql-client
docker-php-ext-install -j$(nproc) iconv intl pdo pdo_mysql mysqli mbstring
docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/
docker-php-ext-install -j$(nproc) gd
pecl install mcrypt-1.0.2
docker-php-ext-enable mcrypt
- name: Checkout repository
uses: actions/checkout@v1

- name: Install Composer dependencies
run: |
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
composer global require "phpunit/phpunit=6.1.0"
composer global require wp-coding-standards/wpcs
$HOME/.composer/vendor/bin/phpcs --config-set installed_paths $HOME/.composer/vendor/wp-coding-standards/wpcs
- name: Install WordPress test suite
run: |
bash bin/install-wp-tests.sh wordpress_test root root mysql latest
- name: Coding standards
run: $HOME/.composer/vendor/bin/phpcs

- name: Unit tests
run: $HOME/.composer/vendor/bin/phpunit
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Cloudinary Auto-Upload for WordPress

[![CircleCI](https://circleci.com/gh/junaidbhura/auto-cloudinary.svg?style=svg)](https://circleci.com/gh/junaidbhura/auto-cloudinary)
[![GitHub Actions](https://github.com/junaidbhura/auto-cloudinary/workflows/Coding%20Standards%20and%20Tests/badge.svg)

[Download the WP Plugin ♥](https://wordpress.org/plugins/auto-cloudinary/)

Expand Down
3 changes: 3 additions & 0 deletions tests/test-plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ static function setUpBeforeClass() {
update_option( 'large_size_h', 576 );
update_option( 'medium_size_w', 300 );
update_option( 'medium_size_h', 169 );
update_option( 'thumbnail_size_w', 150 );
update_option( 'thumbnail_size_h', 150 );
set_post_thumbnail_size( 0, 0 );

add_image_size( 'different_aspect_ratio', 400, 200, true );

Expand Down

0 comments on commit a7b4443

Please sign in to comment.