forked from woocommerce/woocommerce-admin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
executable file
·71 lines (61 loc) · 2.19 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
sudo: required
language: php
dist: trusty
matrix:
include:
- name: "PHP 7.3 unit tests, PHP Coding standards check and JS tests"
php: 7.3
env: WP_VERSION=latest WP_MULTISITE=0 WP_CORE_DIR=/tmp/wordpress RUN_PHPCS=1 RUN_JS=1 COMPOSER_DEV=1
- name: "PHP 7.3 unit tests, run in random order"
php: 7.3
env: WP_VERSION=latest WP_MULTISITE=0 WP_CORE_DIR=/tmp/wordpress RUN_RANDOM=1 COMPOSER_DEV=1
- name: "PHP 7.2 unit tests"
php: 7.2
env: WP_VERSION=latest WP_MULTISITE=0 WP_CORE_DIR=/tmp/wordpress COMPOSER_DEV=1
- name: "PHP 7.1 unit tests"
php: 7.1
env: WP_VERSION=latest WP_MULTISITE=0 WP_CORE_DIR=/tmp/wordpress COMPOSER_DEV=1
- name: "PHP 7.0 unit tests"
php: 7.0
env: WP_VERSION=latest WP_MULTISITE=0 WP_CORE_DIR=/tmp/wordpress
- name: "PHP 5.6 unit tests"
php: 5.6
env: WP_VERSION=latest WP_MULTISITE=0 WP_CORE_DIR=/tmp/wordpress WC_VERSION=3.8.1
allow_failures:
php: 7.3
env: WP_VERSION=latest WP_MULTISITE=0 WP_CORE_DIR=/tmp/wordpress RUN_RANDOM=1 COMPOSER_DEV=1
before_install:
- nvm install 'lts/*'
before_script:
- phpenv config-rm xdebug.ini
- export PATH="$WP_CORE_DIR/wp-content/plugins/woocommerce-admin/vendor/bin:$PATH"
- bash bin/install-wp-tests.sh wc_admin_test root '' localhost $WP_VERSION
- bash bin/travis.sh before
- node --version
- npm --version
- timedatectl
script:
- bash bin/js_lint_test.sh
- bash bin/phpunit.sh
- bash bin/phpcs.sh
branches:
only:
- master
- version/1.0
before_deploy:
# Remove our unneeded symlink.
- rm docs/components/packages
# Copy each component README to the docs folder.
- find packages/components/src -type f -name 'README.md' | sed 's/\(packages\/components\/src\/\)\(.*\)README\.md/docs\/components\/packages\/\2/g' | xargs mkdir -p
- find packages/components/src -type f -name 'README.md' | sed 's/\(packages\/components\/src\/\)\(.*\)\(README\.md\)/\1\2\3 docs\/components\/packages\/\2/g' | xargs -n2 cp
deploy:
local_dir: docs
provider: pages
skip_cleanup: true
github_token: $GH_PAGES_TOKEN
keep_history: true
on:
condition: $RUN_JS == 1 # only deploy on the PHP 7.2/JS build
branch: master
target_branch: gh-pages
verbose: true