-
-
Notifications
You must be signed in to change notification settings - Fork 27
/
.travis.yml
78 lines (69 loc) · 2.26 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# TravisCI configuration for szepeviktor/phpstan-wordpress
if: "branch IN (master, 2.x)"
language: "php"
os:
- "linux"
dist: "bionic"
php:
- "8.3"
- "8.2"
- "8.1"
- "8.0"
env:
- TYPOS_VERSION="1.27.3"
jobs:
include:
-
name: "PHP 7.4"
php: "7.4"
script:
- "composer test:syntax -- --no-progress --exclude tests/data/hook-callback-named-args.php"
- "composer test:phpunit -- --verbose"
- "composer test:cs -- -s"
- "composer test:phpstan -- --ansi --no-progress"
-
name: "With lowest deps"
php: "7.4"
install:
- "composer update --no-interaction --prefer-lowest"
- "composer update --no-interaction --with-all-dependencies szepeviktor/phpcs-psr-12-neutron-hybrid-ruleset 'php-stubs/wordpress-stubs:^6.1'"
script:
- "composer test:phpunit -- --verbose"
- "composer test:phpstan -- --ansi --no-progress"
-
name: "Search for misspellings"
before_install: "skip"
install:
- |
mkdir -p "${HOME}/typos"
wget --progress=dot:mega --directory-prefix="${HOME}/typos" \
"https://github.com/crate-ci/typos/releases/download/v${TYPOS_VERSION}/typos-v${TYPOS_VERSION}-x86_64-unknown-linux-musl.tar.gz"
tar -xzvf "${HOME}/typos/typos-v${TYPOS_VERSION}-x86_64-unknown-linux-musl.tar.gz" -C "${HOME}/typos" ./typos
script:
- |
"${HOME}/typos/typos"
-
name: "Check exported files"
php: "7.4"
before_install: "skip"
install: "skip"
script:
- |
EXPECTED="LICENSE,README.md,bootstrap.php,composer.json,extension.neon"
CURRENT="$(git archive HEAD | tar --list --exclude="src" --exclude="src/*" | paste --serial --delimiters=",")"
echo "CURRENT =${CURRENT}"
echo "EXPECTED=${EXPECTED}"
test "${CURRENT}" = "${EXPECTED}"
cache:
directories:
- "${HOME}/.composer/cache"
before_install:
- "phpenv config-rm xdebug.ini"
- "composer validate --strict"
install:
- "composer update --no-interaction"
script:
- "composer test:syntax -- --no-progress"
- "composer test:phpunit -- --verbose"
- "composer test:cs -- -s"
- "composer test:phpstan -- --ansi --no-progress"