1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-12-18 05:40:07 +00:00

Merge pull request #452 from dritter/improve_travis_and_vms

Improve travis and VMs
This commit is contained in:
Ben Hilburn 2017-03-20 22:03:32 -04:00 committed by GitHub
commit 9e40f2d9f2
8 changed files with 77 additions and 4 deletions

View file

@ -14,8 +14,9 @@ before_script:
install: install:
- "sudo apt-get update -qq" - "sudo apt-get update -qq"
- "sudo apt-get install zsh" - "sudo apt-get install -y zsh"
- "sudo chsh -s $(which zsh)" - "sudo chsh -s $(which zsh)"
- "sudo apt-get install -y git mercurial subversion jq node golang ruby python python-virtualenv"
script: script:
- test/powerlevel9k.spec - test/powerlevel9k.spec

View file

@ -3,6 +3,11 @@
# Install ZSH # Install ZSH
sudo pkg install -y zsh sudo pkg install -y zsh
sudo chsh -s `which zsh` vagrant sudo chsh -s `which zsh` vagrant
sudo ln -s /usr/local/bin/zsh /usr/bin/zsh
# Install git # Install git
sudo pkg install -y git sudo pkg install -y git
# Install mercurial
sudo pkg install -y mercurial
# Install subversion
sudo pkg install -y subversion

View file

@ -1,4 +1,9 @@
#!/usr/bin/zsh #!/usr/bin/zsh
echo 'LANG=en_US.UTF-8' !> ~/.zshrc echo 'LANG=en_US.UTF-8' >! ~/.zshrc
echo 'source /vagrant_data/powerlevel9k.zsh-theme' >> ~/.zshrc echo 'source /vagrant_data/powerlevel9k.zsh-theme' >> ~/.zshrc
echo 'echo "Have a look at the ~/p9k folder for prepared test setups."' >> ~/.zshrc
# setup environment
/vagrant_data/test-vm-providers/setup-environment.sh

View file

@ -0,0 +1,44 @@
#!/usr/bin/zsh
OLDPWD="$(pwd)"
cd $HOME
TESTFOLDER="${HOME}/p9k"
mkdir -p $TESTFOLDER
cd $TESTFOLDER
# Make a deep test folder
mkdir -p deep-folder/1/12/123/1234/12345/123456/1234567/123455678/123456789
# Make a git repo
mkdir git-repo
cd git-repo
git config --global user.email "test@powerlevel9k.theme"
git config --global user.name "Testing Tester"
git init
echo "TEST" >> testfile
git add testfile
git commit -m "Initial commit"
cd $TESTFOLDER
# Make a Mercurial repo
mkdir hg-repo
cd hg-repo
export HGUSER="Test bot <bot@example.com>"
hg init
echo "TEST" >> testfile
hg add testfile
hg ci -m "Initial commit"
cd $TESTFOLDER
# Setup a SVN folder
svnadmin create ~/.svn-repo
mkdir svn-repo
svn checkout "file://${HOME}/.svn-repo" "svn-repo"
cd svn-repo
echo "TEST" >> testfile
svn add testfile
svn commit -m "Initial commit"
cd $TESTFOLDER
cd $OLDPWD

View file

@ -24,4 +24,7 @@ antigen apply
mkdir ~/antigen mkdir ~/antigen
curl -qL https://raw.githubusercontent.com/zsh-users/antigen/master/antigen.zsh > ~/antigen/antigen.zsh curl -qL https://raw.githubusercontent.com/zsh-users/antigen/master/antigen.zsh > ~/antigen/antigen.zsh
source ~/antigen/antigen.zsh source ~/antigen/antigen.zsh
# setup environment
/vagrant_data/test-vm-providers/setup-environment.sh
) )

View file

@ -7,3 +7,13 @@ sudo apt-get install -y git
sudo apt-get install -y zsh sudo apt-get install -y zsh
sudo chsh -s $(which zsh) vagrant sudo chsh -s $(which zsh) vagrant
# Install mercurial
sudo apt-get install -y mercurial
# Install Subversion
sudo apt-get install -y subversion
# install golang
echo 'golang-go golang-go/dashboard boolean false' | sudo debconf-set-selections
sudo apt-get install -y golang
# Install dependencies for tests
sudo apt-get install -y jq node ruby python python-virtualenv

View file

@ -28,4 +28,6 @@ plugins=(git rake ruby)
source $ZSH/oh-my-zsh.sh source $ZSH/oh-my-zsh.sh
' > $HOME/.zshrc ' > $HOME/.zshrc
# setup environment
/vagrant_data/test-vm-providers/setup-environment.sh
) )

View file

@ -23,4 +23,7 @@ chmod 440 /etc/sudoers.d/$NEW_USER
ln -s /vagrant_data/powerlevel9k.zsh-theme ~/.zprezto/modules/prompt/functions/prompt_powerlevel9k_setup ln -s /vagrant_data/powerlevel9k.zsh-theme ~/.zprezto/modules/prompt/functions/prompt_powerlevel9k_setup
sed -i "s/theme\ 'sorin'/theme\ 'powerlevel9k'/g" ~/.zpreztorc sed -i "s/theme\ 'sorin'/theme\ 'powerlevel9k'/g" ~/.zpreztorc
# setup environment
/vagrant_data/test-vm-providers/setup-environment.sh
) )