Skip to content

Commit d27dcdd

Browse files
authored
Modernize testsuite
1 parent 233f475 commit d27dcdd

1 file changed

Lines changed: 115 additions & 8 deletions

File tree

.travis.yml

Lines changed: 115 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,130 @@ sudo: required
22

33
language: php
44

5+
# Stage order
6+
stages:
7+
- pre-conditions
8+
- test
9+
- quality
10+
11+
12+
################
13+
# Test stage #
14+
################
15+
516
php:
617
- 7.2
718
- 7.3
819
- 7.4
920

1021
env:
11-
- SIMPLESAMLPHP_VERSION=1.17.*
22+
- COMMAND="composer install"
23+
- COMMAND="composer update"
1224

1325
before_script:
14-
- composer require "simplesamlphp/simplesamlphp:${SIMPLESAMLPHP_VERSION}" --no-update
15-
- composer update --no-interaction
26+
- ${COMMAND}
1627

1728
script:
18-
- vendor/simplesamlphp/simplesamlphp-test-framework/bin/check-syntax-php.sh
19-
- if [[ "$TRAVIS_PHP_VERSION" == "7.2" ]]; then php vendor/phpunit/phpunit/phpunit; else php vendor/phpunit/phpunit/phpunit --no-coverage; fi
20-
- if [[ "$TRAVIS_PHP_VERSION" == "7.3" ]]; then vendor/bin/psalm; fi
29+
- php vendor/bin/phpunit --no-coverage
30+
31+
jobs:
32+
fast_finish: true
33+
allow_failures:
34+
- php: 7.3
35+
env: Psalm
36+
- php: 7.3
37+
env: Security check (composer install)
38+
- php: 7.3
39+
env: Security check (composer update)
40+
- php: 7.3
41+
env: PHP Codesniffer
42+
43+
include:
44+
45+
##########################
46+
# Pre-conditions stage #
47+
##########################
48+
49+
- stage: pre-conditions
50+
php: 7.2
51+
env: Syntax check PHP
52+
before_script:
53+
- composer install
54+
script:
55+
- vendor/bin/check-syntax-php.sh
56+
57+
- stage: pre-conditions
58+
php: 7.3
59+
env: Syntax check PHP
60+
before_script:
61+
- composer install
62+
script:
63+
- vendor/bin/check-syntax-php.sh
64+
65+
- stage: pre-conditions
66+
php: 7.4
67+
env: Syntax check PHP
68+
before_script:
69+
- composer install
70+
script:
71+
- vendor/bin/check-syntax-php.sh
72+
73+
- stage: pre-conditions
74+
php: 7.3
75+
env: Syntax check YAML / XML / JSON
76+
before_script:
77+
- composer update
78+
script:
79+
- vendor/bin/check-syntax-yaml.sh
80+
- vendor/bin/check-syntax-xml.sh
81+
- vendor/bin/check-syntax-json.sh
82+
83+
84+
###################
85+
# Quality stage #
86+
###################
87+
88+
- stage: quality
89+
php: 7.3
90+
env: Security check (composer install)
91+
before_script:
92+
- composer install
93+
script:
94+
- vendor/bin/security-checker security:check
95+
96+
- stage: quality
97+
php: 7.3
98+
env: Security check (composer update)
99+
before_script:
100+
- composer update
101+
script:
102+
- vendor/bin/security-checker security:check
103+
104+
- stage: quality
105+
php: 7.3
106+
env: Coveralls
107+
before_script:
108+
- composer update
109+
- php vendor/bin/phpunit
110+
script:
111+
- php vendor/bin/php-coveralls -v
112+
113+
- stage: quality
114+
php: 7.3
115+
env: Psalm
116+
before_script:
117+
- composer update
118+
script:
119+
- vendor/bin/psalm
21120

22-
after_success:
23-
- if [[ "$TRAVIS_PHP_VERSION" == "7.2" ]]; then php vendor/bin/php-coveralls -v; fi
121+
- stage: quality
122+
php: 7.3
123+
env: PHP Codesniffer
124+
before_script:
125+
- composer update
126+
script:
127+
- vendor/bin/phpcs
24128

129+
notifications:
130+
slack:
131+
secure: h5YiO7tAk5bzAQBkUZ3crnOFAOBkNqHp0nc2cxvGauogVfCLE9K8bME512uTeu9QWMht2D30uyTOHFKQ7sPEW4omHNF4qYl4p9L037oQFfEwZPBzJFo9QUzviT3mvKHTN4HSQOkq/08ZoMhh1i3p/OhyFS56J28IDJWDqGZkEUE=

0 commit comments

Comments
 (0)