Skip to content

Commit 134be84

Browse files
committed
Sync CI with simplesamlphp project
1 parent e78c7f3 commit 134be84

6 files changed

Lines changed: 75 additions & 14 deletions

File tree

.coveralls.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
coverage_clover: build/logs/clover.xml
2+
json_path: build/logs/coveralls-upload.json
3+
service_name: travis-ci

.travis.yml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,28 @@
1+
sudo: required
2+
13
language: php
24

35
php:
46
- 5.6
57
- 7.0
68
- 7.1
79
- 7.2
8-
- hhvm
10+
- 7.3
911

10-
matrix:
11-
allow_failures:
12-
- php: 7.2
13-
- php: hhvm
12+
env:
13+
- SIMPLESAMLPHP_VERSION=1.17.*
1414

1515
before_script:
16-
- composer update
17-
- if [[ "$TRAVIS_PHP_VERSION" == "7.2" ]]; then echo 'error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi
16+
- composer require "simplesamlphp/simplesamlphp:${SIMPLESAMLPHP_VERSION}" --no-update
17+
- composer update --no-interaction
18+
- if [[ "$TRAVIS_PHP_VERSION" == "5.6" ]]; then composer require --dev php-coveralls/php-coveralls; fi
19+
- if [[ "$TRAVIS_PHP_VERSION" == "7.3" ]]; then composer require --dev vimeo/psalm:1.1.9; fi
20+
21+
script:
22+
- bin/check-syntax.sh
23+
- if [[ "$TRAVIS_PHP_VERSION" == "5.6" ]]; then php vendor/phpunit/phpunit/phpunit; else php vendor/phpunit/phpunit/phpunit --no-coverage; fi
24+
- if [[ "$TRAVIS_PHP_VERSION" == "7.3" ]]; then vendor/bin/psalm; fi
1825

19-
script: php vendor/phpunit/phpunit/phpunit
26+
after_success:
27+
- if [[ "$TRAVIS_PHP_VERSION" == "5.6" ]]; then php vendor/bin/php-coveralls -v; fi
2028

composer.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,19 @@
1010
"homepage": "http://orcid.org/0000-0002-9388-8592"
1111
}
1212
],
13+
"config": {
14+
"preferred-install": {
15+
"simplesamlphp/simplesamlphp": "source",
16+
"*": "dist"
17+
}
18+
},
1319
"require": {
1420
"php": ">=5.6",
1521
"simplesamlphp/composer-module-installer": "~1.1"
1622
},
1723
"require-dev": {
1824
"simplesamlphp/simplesamlphp": ">=1.17",
19-
"phpunit/phpunit": "~4.8"
25+
"phpunit/phpunit": "~5.7"
2026
},
2127
"autoload": {
2228
"psr-4": {
@@ -33,4 +39,3 @@
3339
"source": "https://github.com/safire-ac-za/simplesamlphp-module-fticks"
3440
}
3541
}
36-

phpunit.xml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,25 @@
11
<?xml version="1.0" encoding="utf-8" ?>
2-
<phpunit bootstrap="tests/bootstrap.php" colors="true">
2+
<phpunit backupGlobals="false"
3+
backupStaticAttributes="false"
4+
colors="true"
5+
convertErrorsToExceptions="true"
6+
convertNoticesToExceptions="true"
7+
convertWarningsToExceptions="true"
8+
processIsolation="false"
9+
stopOnFailure="false"
10+
bootstrap="./tests/bootstrap.php">
311
<testsuites>
4-
<testsuite name="The project's test suite">
5-
<directory>tests/</directory>
12+
<testsuite name="Unit Tests">
13+
<directory>./tests/</directory>
614
</testsuite>
715
</testsuites>
816
<filter>
917
<whitelist processUncoveredFilesFromWhitelist="true">
1018
<directory suffix=".php">./lib</directory>
19+
<exclude>
20+
<directory>./vendor/</directory>
21+
<directory>./tests/</directory>
22+
</exclude>
1123
</whitelist>
1224
</filter>
1325
<logging>

psalm.xml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?xml version="1.0"?>
2+
<psalm
3+
name="SimpleSAMLphp module"
4+
useDocblockTypes="true"
5+
totallyTyped="false"
6+
>
7+
<projectFiles>
8+
<directory name="lib" />
9+
<ignoreFiles>
10+
<directory name="vendor" />
11+
</ignoreFiles>
12+
</projectFiles>
13+
14+
<issueHandlers>
15+
<LessSpecificReturnType errorLevel="info" />
16+
17+
<!-- level 3 issues - slightly lazy code writing, but probably low false-negatives -->
18+
<DeprecatedMethod errorLevel="info" />
19+
20+
<MissingClosureReturnType errorLevel="info" />
21+
<MissingReturnType errorLevel="info" />
22+
<MissingPropertyType errorLevel="info" />
23+
<InvalidDocblock errorLevel="info" />
24+
<MisplacedRequiredParam errorLevel="info" />
25+
26+
<PropertyNotSetInConstructor errorLevel="info" />
27+
<MissingConstructor errorLevel="info" />
28+
<MissingClosureParamType errorLevel="info" />
29+
<MissingParamType errorLevel="info" />
30+
<UnusedClass errorLevel="info" />
31+
<PossiblyUnusedMethod errorLevel="info" />
32+
</issueHandlers>
33+
</psalm>

tests/bootstrap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require_once($projectRoot.'/vendor/autoload.php');
44

55
// Symlink module into ssp vendor lib so that templates and urls can resolve correctly
6-
$linkPath = $projectRoot.'/vendor/simplesamlphp/simplesamlphp/modules/consent';
6+
$linkPath = $projectRoot.'/vendor/simplesamlphp/simplesamlphp/modules/fticks';
77
if (file_exists($linkPath) === false) {
88
echo "Linking '$linkPath' to '$projectRoot'\n";
99
symlink($projectRoot, $linkPath);

0 commit comments

Comments
 (0)