[saml] Update Composer dependency ahead of release
[friendica-addons.git/.git] / saml / vendor / onelogin / php-saml / .github / workflows / php-package.yml
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 4.x package
5
6 on:
7   push:
8     branches: [ 4.* ]
9   pull_request:
10     branches: [ 4.* ]
11
12 jobs:
13   test:
14     runs-on: ${{ matrix.operating-system }}
15     strategy:
16       fail-fast: false
17       matrix:
18         operating-system: ['ubuntu-latest']
19         php-versions: [7.3, 7.4, 8.0, 8.1]
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       - uses: actions/checkout@v2
35
36       - name: Validate composer.json and composer.lock
37         run: composer validate
38
39       - name: Install Composer dependencies
40         run: |
41           composer self-update
42           composer install --prefer-source --no-interaction
43       - name: Syntax check PHP
44         run: |
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/.
49  
50       - name: PHP Code Sniffer
51         run: php vendor/bin/phpcs --standard=tests/ZendModStandard src/Saml2 demo1 demo2 endpoints tests/src
52     
53       - name: Run unit tests
54         run: vendor/bin/phpunit --verbose --debug