File: travisbuild

package info (click to toggle)
ruby-rugged 1.1.0%2Bds-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 2,692 kB
  • sloc: ansic: 8,721; ruby: 7,408; sh: 55; makefile: 5
file content (31 lines) | stat: -rwxr-xr-x 1,125 bytes parent folder | download
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
#!/bin/sh

set -ex

# Create a test repo which we can use for the online tests
mkdir $HOME/_temp
git init --bare $HOME/_temp/test.git
git daemon --listen=localhost --export-all --enable=receive-pack --base-path=$HOME/_temp $HOME/_temp 2>/dev/null &

# On Actions we start with 777 which means sshd won't let us in
chmod 750 $HOME

ssh-keygen -t rsa -f ~/.ssh/rugged_test_rsa -N "" -q
cat ~/.ssh/rugged_test_rsa.pub >>~/.ssh/authorized_keys
ssh-keyscan -t rsa localhost >>~/.ssh/known_hosts

export GITTEST_REMOTE_GIT_URL="git://localhost/test.git"
export GITTEST_REMOTE_SSH_URL="ssh://localhost/$HOME/_temp/test.git"
export GITTEST_REMOTE_SSH_USER=$USER
export GITTEST_REMOTE_SSH_KEY="$HOME/.ssh/rugged_test_rsa"
export GITTEST_REMOTE_SSH_PUBKEY="$HOME/.ssh/rugged_test_rsa.pub"
export GITTEST_REMOTE_SSH_PASSPHRASE=""
export GITTEST_REMOTE_REPO_PATH="$HOME/_temp/test.git"

echo 'PasswordAuthentication yes' | sudo tee -a /etc/sshd_config
eval $(ssh-agent)
ssh-add $GITTEST_REMOTE_SSH_KEY

# We need the config so the tests don't fail
git config --global user.name 'The rugged tests are fragile'
bundle exec rake || exit $?