Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tests for --ssh parameter #2772

Closed
danielbachhuber opened this issue May 18, 2016 · 3 comments
Closed

Add tests for --ssh parameter #2772

danielbachhuber opened this issue May 18, 2016 · 3 comments

Comments

@danielbachhuber
Copy link
Member

We'll need a box we can connect to from Travis, though.

From #2754

@miya0001
Copy link
Member

I came up with an idea.
Run ssh server and connect itself on travis like following.
Sorry I haven't tried yet... 😄

ci/setup_ssh_server.sh

#!/bin/sh 

sudo apt-get update -qq
sudo apt-get install -qq libssh2-1-dev openssh-client openssh-server

sudo start ssh

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

export SSH_PRIVATE_KEY="$HOME/.ssh/id_rsa"
export SSH_PUBLIC_KEY="$HOME/.ssh/id_rsa.pub"

.travis.yaml

language: php

php:
  - 5.3
  - 5.4
  - 5.5

before_script:
  - sh ./ci/setup_ssh_server.sh
  - ./ci/prepare.sh

script: ./ci/test.sh

@danielbachhuber
Copy link
Member Author

@miya0001 Or we could just set up a remote server used for CI, and encrypt the connection details.

@danielbachhuber
Copy link
Member Author

Adding this to the wish list for now http://wp-cli.org/docs/wish-list/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants