-
Notifications
You must be signed in to change notification settings - Fork 4
/
.travis.yml
34 lines (31 loc) · 2.09 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
# Import Travis configuration from dev-tools repo
version: ~> 1.0
import:
- source: humanmade/altis-dev-tools:travis/module.yml@f45c03b0
mode: merge
# Add your custom config below, which will merge with the default module config from the section above.
before_install:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
before_script:
# Install Altis and start the local server
- composer create-project altis/skeleton:dev-$TRAVIS_BRANCH --stability=dev $HOME/test-root || composer create-project altis/skeleton:dev-master --stability=dev $HOME/test-root || exit 1
# Install Altis test theme package
- cd $HOME/test-root && composer require altis/test-theme
# Mark the test theme as the default
- cd $HOME/test-root && cat <<< $(jq '. + {"extra":{"altis":{"modules":{"cms":{"default-theme":"test-theme"}}}}}' composer.json | jq . -) > composer.json
# Require the current module and alias the branch to be tested to the target version main branch
# Tricks composer to allow installing the branch version if a version constaint exists, by increasing the current patch version
- cd $HOME/test-root && composer require -W "$ALTIS_PACKAGE:dev-${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH} as `jq \".\\\"packages-dev\\\"[] | select (.name==\\\"$ALTIS_PACKAGE\\\") | .version\" composer.lock | sed -e 's/\"//g;/^dev/q;s/\$/9/'`"
script:
- cd $HOME/test-root && composer server start
- cd $HOME/test-root && composer server db info
- cd $HOME/test-root && composer server db exec -- "select * from wp_site;"
- cd $HOME/test-root && composer server status
- cd $HOME/test-root && composer server exec -- ls -al
- cd $HOME/test-root && composer server cli site list
- cd $HOME/test-root && composer server start --xdebug=debug,profile
- curl https://test-root.altis.dev/ | grep '<title>'
- cd $HOME/test-root && composer server exec printenv | grep XDEBUG_MODE=debug,profile
- curl -XGET https://test-root.altis.dev/webgrind/ | grep '<title>webgrind</title>'
- cd $HOME/test-root && composer server stop --clean
- cd $HOME/test-root && composer server destroy --clean