Skip to content

Commit 94a3932

Browse files
authored
Create php.yml
1 parent 5d865b9 commit 94a3932

File tree

1 file changed

+66
-0
lines changed

1 file changed

+66
-0
lines changed

.github/workflows/php.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: PHP Composer
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Validate composer.json and composer.lock
15+
run: composer validate
16+
- name: Cache Composer packages
17+
id: composer-cache
18+
uses: actions/cache@v2
19+
with:
20+
path: vendor
21+
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
22+
restore-keys: |
23+
${{ runner.os }}-php-
24+
- name: Install dependencies
25+
if: steps.composer-cache.outputs.cache-hit != 'true'
26+
run: composer install --prefer-dist --no-progress --no-suggest
27+
phpunit-test:
28+
runs-on: ubuntu-latest
29+
steps:
30+
- uses: actions/checkout@v2
31+
- uses: php-actions/composer@dynamic-docker
32+
- name: PHP 7.0 Tests
33+
uses: php-actions/phpunit@dynamic-docker
34+
with:
35+
bootstrap: vendor/autoload.php
36+
configuration: phpunit.xml
37+
php_version : 7.0
38+
phpunit_version : 6.5.14
39+
- name: PHP 7.1 Tests
40+
uses: php-actions/phpunit@dynamic-docker
41+
with:
42+
bootstrap: vendor/autoload.php
43+
configuration: phpunit.xml
44+
php_version : 7.1
45+
phpunit_version : 6.5.14
46+
- name: PHP 7.2 Tests
47+
uses: php-actions/phpunit@dynamic-docker
48+
with:
49+
bootstrap: vendor/autoload.php
50+
configuration: phpunit.xml
51+
php_version : 7.2
52+
phpunit_version : 6.5.14
53+
- name: PHP 7.3 Tests
54+
uses: php-actions/phpunit@dynamic-docker
55+
with:
56+
bootstrap: vendor/autoload.php
57+
configuration: phpunit.xml
58+
php_version : 7.3
59+
phpunit_version : 6.5.14
60+
- name: PHP 7.4 Tests
61+
uses: php-actions/phpunit@dynamic-docker
62+
with:
63+
bootstrap: vendor/autoload.php
64+
configuration: phpunit.xml
65+
php_version : 7.4
66+
phpunit_version : 6.5.14

0 commit comments

Comments
 (0)