forked from Homebrew/homebrew-services
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
44 lines (40 loc) · 1.05 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
language: ruby
os: osx
env: OSX=10.12
osx_image: xcode8.1
rvm: system
before_install:
- export TRAVIS_COMMIT="$(git rev-parse --verify -q HEAD)"
- if [ -f ".git/shallow" ]; then
travis_retry git fetch --unshallow;
fi
- HOMEBREW_REPOSITORY="$(brew --repo)"
- sudo chown -R "$USER" "$HOMEBREW_REPOSITORY"
- git -C "$HOMEBREW_REPOSITORY" reset --hard origin/master
- brew update || brew update
- HOMEBREW_TAP_DIR="$(brew --repo "$TRAVIS_REPO_SLUG")"
- rm -rf "$HOMEBREW_TAP_DIR"
- ln -s "$PWD" "$HOMEBREW_TAP_DIR"
- export HOMEBREW_DEVELOPER="1"
- ulimit -n 1024
install:
- brew install mysql
script:
# Test start command
- brew services start mysql
- brew services list | grep mysql
- sleep 2
- mysql -uroot -e 'show databases'
# Test stop command
- brew services stop mysql
- sleep 2
- test ! `launchctl list | grep mysql`
# Test run command
- brew services run mysql
- sleep 2
- mysql -uroot -e 'show databases'
- brew services stop mysql
notifications:
email:
on_success: never
on_failure: always