mirror of
https://github.com/oh-my-fish/oh-my-fish.git
synced 2024-11-22 09:16:08 +08:00
Run tests on Travis osx and linux machines
Unfortunately we can't use docker anymore in order to support automatic build on OSX.
This commit is contained in:
parent
74d4e90f5d
commit
854493489c
36
.travis.yml
36
.travis.yml
|
@ -1,7 +1,20 @@
|
|||
language: c
|
||||
dist: trusty
|
||||
sudo: required
|
||||
language: generic
|
||||
services:
|
||||
- docker
|
||||
|
||||
os:
|
||||
- linux
|
||||
- osx
|
||||
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- bc
|
||||
- doxygen
|
||||
- expect
|
||||
- gettext
|
||||
- libncurses5-dev
|
||||
- tree
|
||||
|
||||
env:
|
||||
global:
|
||||
|
@ -10,19 +23,22 @@ env:
|
|||
|
||||
before_install:
|
||||
- source tools/travis-github-pr-integration.sh
|
||||
- tools/travis-install-fish.sh
|
||||
|
||||
before_script:
|
||||
- docker build --build-arg OMF_REPO_BRANCH=$OMF_REPO_BRANCH --build-arg OMF_REPO_URI=$OMF_REPO_URI -t oh-my-fish . < Dockerfile
|
||||
- docker run -t oh-my-fish /usr/bin/fish -c "export; tree -h"
|
||||
- tree -h
|
||||
- export
|
||||
- fish $TRAVIS_BUILD_DIR/bin/install
|
||||
|
||||
script:
|
||||
- docker run -t oh-my-fish /usr/bin/fish "tests/run.fish"
|
||||
- docker run -t oh-my-fish /usr/bin/fish -c "cd pkg/fish-spec; fish-spec"
|
||||
- docker run -t oh-my-fish /usr/bin/fish -c "cd pkg/omf; fish-spec"
|
||||
- docker run -t oh-my-fish /usr/bin/fish "tests/test-generate-themes-doc.fish"
|
||||
- tests/run.fish
|
||||
- pushd pkg/fish-spec; fish -c 'fish-spec'; popd
|
||||
- pushd pkg/omf; fish -c 'fish-spec'; popd
|
||||
- tests/test-generate-themes-doc.fish
|
||||
|
||||
after_failure:
|
||||
- docker ps -a
|
||||
- pwd
|
||||
- cd ~/.config/fish; tree -h; find . -type f | xargs cat
|
||||
|
||||
notifications:
|
||||
email:
|
||||
|
|
0
tests/run.fish
Normal file → Executable file
0
tests/run.fish
Normal file → Executable file
16
tools/travis-install-fish.sh
Executable file
16
tools/travis-install-fish.sh
Executable file
|
@ -0,0 +1,16 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -o pipefail
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
#set -o xtrace
|
||||
|
||||
# Return if we are not in a Pull Request
|
||||
if [[ "$TRAVIS_OS_NAME" = "linux" ]]; then
|
||||
sudo apt-add-repository -y ppa:fish-shell/release-2
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y fish
|
||||
else
|
||||
brew update
|
||||
brew install fish tree
|
||||
fi
|
Loading…
Reference in New Issue
Block a user