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
4 name: php-saml 4.x package
14 runs-on: ${{ matrix.operating-system }}
18 operating-system: ['ubuntu-latest']
19 php-versions: [7.3, 7.4, 8.0, 8.1]
21 - name: Setup PHP, with composer and extensions
22 uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
24 php-version: ${{ matrix.php-versions }}
25 extensions: mbstring, intl, mcrypt, xml
27 ini-values: post_max_size=256M, max_execution_time=180
30 - name: Set git to use LF
32 git config --global core.autocrlf false
33 git config --global core.eol lf
34 - uses: actions/checkout@v2
36 - name: Validate composer.json and composer.lock
37 run: composer validate
39 - name: Install Composer dependencies
42 composer install --prefer-source --no-interaction
43 - name: Syntax check PHP
45 php vendor/bin/phpcpd --exclude tests --exclude vendor .
46 php vendor/bin/phploc src/.
47 mkdir -p tests/build/dependences
48 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 src/.
50 - name: PHP Code Sniffer
51 run: php vendor/bin/phpcs --standard=tests/ZendModStandard src/Saml2 demo1 demo2 endpoints tests/src
53 - name: Run unit tests
54 run: vendor/bin/phpunit --verbose --debug