modify CI script

Now the command for test should be same as in the local development
environment, adapted from .travis.yml of NetworkX.