-
Notifications
You must be signed in to change notification settings - Fork 108
/
.travis.yml
70 lines (62 loc) · 2.69 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
# Travis CI configuration file.
# @link https://travis-ci.org/
# For use with the Alecaddd WordPress Starter Theme
# @link https://github.com/Alecaddd/awps
# Ditch sudo and use containers.
# @link http://docs.travis-ci.com/user/migrating-from-legacy/#Why-migrate-to-container-based-infrastructure%3F
# @link http://docs.travis-ci.com/user/workers/container-based-infrastructure/#Routing-your-build-to-container-based-infrastructure
sudo: false
# Declare project language.
# @link http://about.travis-ci.org/docs/user/languages/php/
language: php
# Cache composer for faster build
cache:
directories:
# Cache directory for older Composer versions.
- $HOME/.composer/cache/files
# Cache directory for more recent Composer versions.
- $HOME/.cache/composer/files
# Declare versions of PHP to use. Use one decimal max.
# @link http://docs.travis-ci.com/user/build-configuration/
matrix:
fast_finish: true
include:
# Current $required_php_version for WordPress: 5.2.4
# This theme uses namespaces and autoload
# and can't run on version < 5.6
- php: "7.2"
- php: "7.3"
- php: "7.4"
- php: "nightly"
# Use this to prepare your build for testing.
# e.g. copy database configurations, environment variables, etc.
# Failures in this section will result in build status 'errored'.
before_install:
# disable Xdebug to speed up building process
- phpenv config-rm xdebug.ini || echo 'No xdebug config.'
# Install PHP packages.
- composer install --ansi --prefer-dist --no-suggest
# Install ESLint shareable config for WordPress.
# @link https://github.com/WordPress-Coding-Standards/eslint-config-wordpress
- npm install eslint eslint-config-wordpress
# Run test script commands.
# Default is specific to project language.
# All commands must exit with code 0 on success. Anything else is considered failure.
script:
# Run the theme through ESLint.
- npm run lint
# WordPress Coding Standards and PHPCompatibility.
# @link https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards
# @link http://pear.php.net/package/PHP_CodeSniffer/
# @link https://github.com/PHPCompatibility/PHPCompatibilityWP
- composer test
before_script:
# Install PHP packages.
- composer install --ansi --prefer-dist --no-suggest
script:
# Search for PHP syntax errors.
- composer test
# Receive notifications for build results.
# @link http://docs.travis-ci.com/user/notifications/#Email-notifications
notifications:
email: false