Skip to content

Commit 415ae9a

Browse files
Configure Github workflow for testing
1 parent ee6e06d commit 415ae9a

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/php.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: PHP type checking and unit testing
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
strategy:
8+
matrix:
9+
php: ['7.2', '7.3', '7.4']
10+
phpunit: ['8.0', '9.0']
11+
exclude:
12+
- php: '7.2'
13+
phpunit: '9.0'
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v1
18+
19+
- name: Setup PHP
20+
uses: shivammathur/setup-php@v1
21+
with:
22+
php-version: ${{ matrix.php }}
23+
extensions: mbstring, intl, json
24+
coverage: pcov
25+
26+
- name: Validate composer.json and composer.lock
27+
run: composer validate
28+
29+
- name: Declare required PHPUnit version
30+
run: |
31+
composer require --no-update --dev phpunit/phpunit ~${{ matrix.phpunit }}
32+
33+
- name: Install dependencies
34+
run: composer install --prefer-dist --no-progress --no-suggest
35+
36+
#- name: Run type checker
37+
# run: ./vendor/bin/psalm
38+
39+
- name: Run unit tests
40+
run: ./vendor/bin/phpunit --testdox

0 commit comments

Comments
 (0)