Skip to content

Commit 9d0e859

Browse files
authored
Create php-package.yml
1 parent 783d3e8 commit 9d0e859

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

.github/workflows/php-package.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# This workflow will install PHP dependencies, run tests and lint with a variety of PHP versions
2+
# For more information see: https://github.com/marketplace/actions/setup-php-action
3+
4+
name: php-saml package
5+
6+
on:
7+
push:
8+
branches: [ master, 2.* ]
9+
pull_request:
10+
branches: [ master, 2.* ]
11+
12+
jobs:
13+
test:
14+
runs-on: ubuntu-latest
15+
strategy:
16+
fail-fast: false
17+
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
31+
run: composer validate
32+
33+
- name: Install Composer dependencies
34+
composer self-update
35+
composer install --prefer-source --no-interaction
36+
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/.
43+
44+
- name: PHP Code Sniffer
45+
php vendor/bin/phpcs --standard=tests/ZendModStandard lib/Saml2 demo1 demo2 demo-old endpoints tests/src
46+
47+
- name: Run unit tests
48+
vendor/bin/phpunit

0 commit comments

Comments
 (0)