Skip to content

Commit 688a147

Browse files
committed
Add support for Github Actions
1 parent a7328b1 commit 688a147

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

.github/workflows/php-package.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
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: [ 3.* ]
9+
pull_request:
10+
branches: [ 3.* ]
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: [5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4]
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 . --exclude vendor
47+
php vendor/bin/phploc lib/.
48+
mkdir -p tests/build/dependences
49+
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/.
50+
51+
- name: PHP Code Sniffer
52+
run: php vendor/bin/phpcs --standard=tests/ZendModStandard lib/Saml2 demo1 demo2 demo-old endpoints tests/src
53+
54+
- name: Run unit tests
55+
run: vendor/bin/phpunit --verbose --debug

0 commit comments

Comments
 (0)