You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
74 lines
2.1 KiB
74 lines
2.1 KiB
# TravisCI configuration for szepeviktor/phpstan-wordpress
|
|
|
|
if: "branch = master"
|
|
|
|
language: "php"
|
|
os:
|
|
- "linux"
|
|
dist: "bionic"
|
|
|
|
php:
|
|
- "8.0"
|
|
- "7.4"
|
|
- "7.2"
|
|
|
|
env:
|
|
- TYPOS_VERSION="1.16.22"
|
|
|
|
jobs:
|
|
include:
|
|
-
|
|
php: "8.1"
|
|
script:
|
|
- "composer test:syntax -- --no-progress"
|
|
- "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'"
|
|
-
|
|
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"
|