Skip to content

Commit

Permalink
Merge pull request #899 from PopupMaker/issue/640
Browse files Browse the repository at this point in the history
Add GitHub workflow for integration tests
  • Loading branch information
fpcorso authored Nov 18, 2020
2 parents c65fba4 + 2bd341c commit 8600f48
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/phpunit-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: CI - PHPUnit

on:
push:
branches: [ develop ]
pull_request:
branches: [ master, develop ]

jobs:
build:

runs-on: ubuntu-latest
name: PHPUnit tests on PHP ${{ matrix.php-version }}
strategy:
matrix:
php-version: [ '7.1', '7.2', '7.3', '7.4' ]

container:
image: junaidbhura/wp-tests:php-${{ matrix.php-version }}

services:
mysql:
image: mysql:5.7
env:
MYSQL_ROOT_PASSWORD: password
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Validate composer.json and composer.lock
run: composer validate

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

- name: Install WordPress
run: bash bin/install-wp-tests.sh wordpress_test root 'password' mysql

- name: Run test suite
run: composer tests

0 comments on commit 8600f48

Please sign in to comment.