Skip to content

Commit 2992c70

Browse files
committed
Update php-package.yml
1 parent 9d0e859 commit 2992c70

File tree

1 file changed

+36
-27
lines changed

1 file changed

+36
-27
lines changed

.github/workflows/php-package.yml

Lines changed: 36 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -11,38 +11,47 @@ on:
1111

1212
jobs:
1313
test:
14-
runs-on: ubuntu-latest
14+
runs-on: ${{ matrix.operating-system }}
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
operating-system: ['ubuntu-latest', 'windows-latest', 'macos-latest']
19-
php-version: [5.3, 5.4, 5.5, 5.6]
20-
steps:
21-
- name: Checkout
22-
uses: actions/checkout@v2
23-
with:
24-
php-version: ${{ matrix.php-versions }}
25-
extensions: mbstring, intl, mcrypt, xml
26-
tools: composer:v2
27-
ini-values: post_max_size=256M, max_execution_time=180
28-
coverage: xdebug
29-
30-
- name: Validate composer.json and composer.lock
18+
operating-system: ['ubuntu-latest']
19+
php-versions: [5.3, 5.4, 5.5, 5.6]
20+
steps:
21+
- name: Setup PHP, with composer and extensions
22+
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
23+
with:
24+
php-version: ${{ matrix.php-versions }}
25+
extensions: mbstring, intl, mcrypt, xml
26+
tools: composer:v2
27+
ini-values: post_max_size=256M, max_execution_time=180
28+
coverage: xdebug
29+
30+
- name: Set git to use LF
31+
run: |
32+
git config --global core.autocrlf false
33+
git config --global core.eol lf
34+
35+
- uses: actions/checkout@v2
36+
37+
- name: Validate composer.json and composer.lock
3138
run: composer validate
3239

33-
- name: Install Composer dependencies
34-
composer self-update
35-
composer install --prefer-source --no-interaction
40+
- name: Install Composer dependencies
41+
run: |
42+
composer self-update
43+
composer install --prefer-source --no-interaction
3644
37-
- name: Syntax check PHP
38-
php vendor/bin/phpcpd --exclude tests --exclude vendor .
39-
php vendor/bin/phploc . --exclude vendor
40-
php vendor/bin/phploc lib/.
41-
mkdir -p tests/build/dependences
42-
php vendor/bin/pdepend --summary-xml=tests/build/logs/dependence-summary.xml --jdepend-chart=tests/build/dependences/jdepend.svg --overview-pyramid=tests/build/dependences/pyramid.svg lib/.
45+
- name: Syntax check PHP
46+
run: |
47+
php vendor/bin/phpcpd --exclude tests --exclude vendor .
48+
php vendor/bin/phploc . --exclude vendor
49+
php vendor/bin/phploc lib/.
50+
mkdir -p tests/build/dependences
51+
php vendor/bin/pdepend --summary-xml=tests/build/logs/dependence-summary.xml --jdepend-chart=tests/build/dependences/jdepend.svg --overview-pyramid=tests/build/dependences/pyramid.svg lib/.
4352
44-
- name: PHP Code Sniffer
45-
php vendor/bin/phpcs --standard=tests/ZendModStandard lib/Saml2 demo1 demo2 demo-old endpoints tests/src
53+
- name: PHP Code Sniffer
54+
run: php vendor/bin/phpcs --standard=tests/ZendModStandard lib/Saml2 demo1 demo2 demo-old endpoints tests/src
4655

47-
- name: Run unit tests
48-
vendor/bin/phpunit
56+
- name: Run unit tests
57+
run: vendor/bin/phpunit --verbose --debug

0 commit comments

Comments
 (0)