Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: WordPress Plugin CI

on:
push:
branches:
- master
pull_request:

jobs:
test:
runs-on: ubuntu-latest
services:
mysql:
image: mysql:5.7
env:
MYSQL_ROOT_PASSWORD: rootpassword
ports:
- 3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3

strategy:
matrix:
php: [7.4, 7.3, 7.2, 7.1]
wp: [latest, '5.9', '5.8', '5.7']
include:
- php: 7.4
wp: latest
run_phpcs: true

steps:
- uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, mysql, mysqli, pdo_mysql, bcmath, soap, intl, gd, exif, iconv, imagick
coverage: none

- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest

- name: Install WordPress test suite
env:
WP_VERSION: ${{ matrix.wp }}
run: |
bash bin/install-wp-tests.sh wordpress_test root rootpassword 127.0.0.1:${{ job.services.mysql.ports['3306'] }} $WP_VERSION

- name: Run PHPUnit
run: |
phpunit
WP_MULTISITE=1 phpunit

- name: Run PHPCS
if: ${{ matrix.run_phpcs }}
run: |
composer global require wp-coding-standards/wpcs
phpcs --config-set installed_paths $HOME/.composer/vendor/wp-coding-standards/wpcs
phpcs --standard=phpcs.ruleset.xml $(find . -name '*.php')
63 changes: 0 additions & 63 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Disable Comments for WordPress

[![Build Status](https://travis-ci.org/solarissmoke/disable-comments.svg?branch=master)](https://travis-ci.org/solarissmoke/disable-comments)
[![Build Status](https://github.com/WPDevelopers/disable-comments/actions/workflows/tests.yml/badge.svg)](https://github.com/WPDevelopers/disable-comments/actions/workflows/tests.yml)

This is the development respository for the [Disable Comments](https://wordpress.org/plugins/disable-comments/) WordPress plugin. Send pull requests here, download the latest stable version there!

Expand Down
Loading