Skip to content

Commit 9667da7

Browse files
committed
Add Travis CI
1 parent 6baa787 commit 9667da7

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.travis.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
language: shell
2+
3+
before_install:
4+
- sudo apt-get update
5+
6+
# SSH stuff, so we can ssh into localhost
7+
- ssh-keyscan localhost >> $HOME/.ssh/known_hosts
8+
- ssh-keygen -f $HOME/.ssh/id_rsa -N ''
9+
10+
install:
11+
- sudo apt-get install git ssh sed grep gawk
12+
13+
- sudo cp -R $(pwd) /usr/local/etc/git-simpleserver
14+
- cd /usr/local/etc/git-simpleserver/server
15+
- GIT_USER="$(whoami)" NON_INTERACTIVE=true sudo make install
16+
- cd ../client
17+
- make config
18+
- sudo make install
19+
- cd ..
20+
21+
before_script:
22+
# Set up SSH for git-simpleserver
23+
- echo "PermitUserEnvironment yes" | sudo tee -a /etc/ssh/sshd_config > /dev/null
24+
# For some reason including any of the other settings prevents sshd from restarting :(
25+
- sudo /etc/init.d/ssh reload
26+
27+
# Patch out version check. TODO(leon): This is terrible!
28+
- sudo sed -i "s/DO_REQUIRE_VERSION=true/DO_REQUIRE_VERSION=false/" /usr/local/etc/git-simpleserver/server/shell
29+
30+
# Add our ssh public key to git's authorized_keys file
31+
- PUBLIC_KEY=$(cat $HOME/.ssh/id_rsa.pub)
32+
- sudo sed -i "s|your-ssh-public-key|$PUBLIC_KEY|" /home/git/.ssh/authorized_keys
33+
34+
# Set ssh server to use
35+
- sed -i "s/ssh_server:.*/ssh_server:localhost/" $HOME/.git-simpleserver/config.yaml
36+
37+
script:
38+
- ./test.sh --i-know-what-im-doing

0 commit comments

Comments
 (0)