Skip to content

Commit c3b9549

Browse files
committed
Add GitHub workflow 'testing'
Runs `composer validate` and the PHPUnit test suite with multiple PHP versions on multiple platforms, specifically PHP 7.2, 7.3, 7.4 and 8.0 on Ubuntu, Windows and OS X.
1 parent 7837e0f commit c3b9549

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/testing.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Testing
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
run:
11+
runs-on: ${{ matrix.operating-system }}
12+
strategy:
13+
matrix:
14+
operating-system: [ 'ubuntu-latest', 'windows-latest', 'macos-latest' ]
15+
php-versions: [ '7.2', '7.3', '7.4', '8.0' ]
16+
include:
17+
- operating-system: ubuntu-latest
18+
php-versions: '7.2'
19+
20+
steps:
21+
- uses: actions/checkout@v2
22+
23+
- name: Setup PHP
24+
uses: shivammathur/setup-php@v2
25+
with:
26+
php-version: ${{ matrix.php-versions }}
27+
28+
- name: Validate composer.json and composer.lock
29+
run: composer validate
30+
31+
- name: Install dependencies
32+
run: composer update --prefer-dist --no-progress
33+
34+
- name: Run PHPUnit test suite
35+
run: ./vendor/bin/phpunit --configuration ./tests/phpunit.xml

0 commit comments

Comments
 (0)