11dist : trusty
22
3- language : php
3+ language : generic
44
55services :
66 - docker
@@ -13,56 +13,83 @@ notifications:
1313cache :
1414 directories :
1515 - $HOME/.composer/cache
16- - $HOME/.phpbrew
16+ - $HOME/.jest-cache
1717 - $HOME/.npm
18-
19- before_install :
20- - nvm install && nvm use
21- - npm install npm -g
18+ - $HOME/.nvm/.cache
19+ - $HOME/.phpbrew
2220
2321branches :
2422 only :
2523 - master
2624
25+ before_install :
26+ - nvm install
27+
2728jobs :
2829 include :
29- - stage : test
30+ - name : JS unit tests
3031 env : WP_VERSION=latest
32+ before_install :
33+ - nvm install --latest-npm
34+ install :
35+ - npm ci
3136 script :
32- - npm install || exit 1
33- - npm run ci || exit 1
37+ - npm run lint
38+ - npm run check-local-changes
39+ - npm run test-unit -- --ci --maxWorkers=2 --cacheDirectory="$HOME/.jest-cache"
3440
35- - stage : test
41+ - name : PHP unit tests (Docker)
3642 env : WP_VERSION=latest DOCKER=true
3743 script :
3844 - ./bin/run-wp-unit-tests.sh
3945
40- - stage : test
46+ - name : PHP unit tests (PHP 5.6)
47+ language : php
4148 php : 5.6
4249 env : WP_VERSION=latest
4350 script :
4451 - ./bin/run-wp-unit-tests.sh
4552 if : branch = master and type != "pull_request"
4653
47- - stage : test
48- php : 7.1
54+ - name : PHP unit tests (PHP 5.3)
4955 env : WP_VERSION=latest SWITCH_TO_PHP=5.3
5056 script :
5157 - ./bin/run-wp-unit-tests.sh
5258 if : branch = master and type != "pull_request"
5359
54- - stage : test
55- php : 7.1
60+ - name : PHP unit tests (PHP 5.2)
5661 env : WP_VERSION=latest SWITCH_TO_PHP=5.2
5762 script :
5863 - ./bin/run-wp-unit-tests.sh
5964
60- - stage : test
65+ - name : E2E tests (Admin with plugins) (1/2)
6166 env : WP_VERSION=latest POPULAR_PLUGINS=true
67+ install :
68+ - ./bin/setup-local-env.sh
69+ script :
70+ - $( npm bin )/jest --config test/e2e/jest.config.json --listTests > ~/.jest-e2e-tests
71+ - npm run test-e2e -- --ci --cacheDirectory="$HOME/.jest-cache" --runTestsByPath $( awk 'NR % 2 == 0' < ~/.jest-e2e-tests )
72+
73+ - name : E2E tests (Admin with plugins) (2/2)
74+ env : WP_VERSION=latest POPULAR_PLUGINS=true
75+ install :
76+ - ./bin/setup-local-env.sh
77+ script :
78+ - $( npm bin )/jest --config test/e2e/jest.config.json --listTests > ~/.jest-e2e-tests
79+ - npm run test-e2e -- --ci --cacheDirectory="$HOME/.jest-cache" --runTestsByPath $( awk 'NR % 2 == 1' < ~/.jest-e2e-tests )
80+
81+ - name : E2E tests (Author without plugins) (1/2)
82+ env : WP_VERSION=latest E2E_ROLE=author
83+ install :
84+ - ./bin/setup-local-env.sh
6285 script :
63- - ./bin/run-e2e-tests.sh || exit 1
86+ - $( npm bin )/jest --config test/e2e/jest.config.json --listTests > ~/.jest-e2e-tests
87+ - npm run test-e2e -- --ci --cacheDirectory="$HOME/.jest-cache" --runTestsByPath $( awk 'NR % 2 == 0' < ~/.jest-e2e-tests )
6488
65- - stage : test
89+ - name : E2E tests (Author without plugins) (2/2)
6690 env : WP_VERSION=latest E2E_ROLE=author
91+ install :
92+ - ./bin/setup-local-env.sh
6793 script :
68- - ./bin/run-e2e-tests.sh || exit 1
94+ - $( npm bin )/jest --config test/e2e/jest.config.json --listTests > ~/.jest-e2e-tests
95+ - npm run test-e2e -- --ci --cacheDirectory="$HOME/.jest-cache" --runTestsByPath $( awk 'NR % 2 == 1' < ~/.jest-e2e-tests )
0 commit comments