Skip to content

Commit

Permalink
Added multiple php versions to test (#22)
Browse files Browse the repository at this point in the history
* Added multiple php versions to test

* Update composer.json

* Allow phpunit 8

* Allow phpunit 7
  • Loading branch information
vinkla authored May 22, 2020
1 parent d7a6297 commit 9ef7590
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 20 deletions.
32 changes: 16 additions & 16 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@

name: Tests

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

jobs:
build:

run:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Validate composer.json and composer.lock
run: composer validate
strategy:
matrix:
php: [7.1, 7.2, 7.3, 7.4]

- name: Install dependencies
run: composer install --prefer-dist --no-progress
name: PHP ${{ matrix.php }}

- name: PHPUnit
run: composer test
steps:
- uses: actions/checkout@v2
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: xdebug
- run: composer validate
- run: composer install --prefer-dist --no-interaction
- run: vendor/bin/phpunit --coverage-text
5 changes: 1 addition & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,7 @@
}
},
"require-dev": {
"phpunit/phpunit": "^9.1",
"phpunit/phpunit": "^7.0 || ^8.0 || ^9.0",
"10up/wp_mock": "^0.4.2"
},
"scripts": {
"test": "phpunit"
}
}

0 comments on commit 9ef7590

Please sign in to comment.