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

Travis CI errors #74

Closed
gerardroche opened this issue Dec 23, 2017 · 9 comments
Closed

Travis CI errors #74

gerardroche opened this issue Dec 23, 2017 · 9 comments

Comments

@gerardroche
Copy link
Contributor

I'm getting CI errors on travis, what changed?

...
sublime_text_3/Icon/48x48/sublime-text.png
sublime_text_3/Icon/256x256/
sublime_text_3/Icon/256x256/sublime-text.png
sublime_text_3/sublime.py
sublime_text_3/sublime_plugin.py

travis_time:end:24f9deb4:start=1514012490463751222,finish=1514012494801732430,duration=4337981208
�[0K
�[31;1mThe command "sh travis.sh bootstrap" failed and exited with 1 during .�[0m

Your build has been stopped.

https://travis-ci.org/NeoVintageous/NeoVintageous/builds/320570276

https://api.travis-ci.org/v3/job/320570277/log.txt

@randy3k
Copy link
Member

randy3k commented Dec 23, 2017

You forgot to run Xvfb on Linux builds.
https://github.com/randy3k/UnitTesting-example/blob/master/.travis.yml#L21-L25

It was not needed because there was a safety net but the net was just removed 9a152e1#diff-c79de8dc48648dbdee7fa6985d9951eaL12

@gerardroche
Copy link
Contributor Author

The circle ci changes

9a152e1

Looking at the example linked from the readme: https://github.com/randy3k/UnitTesting-example/blob/master/.travis.yml

It looks like some things need to be defined in the travis configs, things like:

    # enable gui, see https://docs.travis-ci.com/user/gui-and-headless-browsers
    - if [ "$TRAVIS_OS_NAME" == "linux"  ]; then
            export DISPLAY=:99.0;
            sh -e /etc/init.d/xvfb start;
fi

@gerardroche
Copy link
Contributor Author

Yeah, can we add that stuff back to the unittesting scripts? It's nice not having to add that to the configs.

@randy3k
Copy link
Member

randy3k commented Dec 23, 2017

Putting

sh -e /etc/init.d/xvfb start;

in Travis config is the correct and the official way to run Xvfb.

If we put it in the script, we have to check if Xvfb is running for every GUI execution (the env variable DISPLAY does not work for this purpose because it is only defined in the script, Travis doesn't have any idea about it).

As there is a plan to refactor the deploy scripts of CI, I think it's time to make it the right way.

@randy3k
Copy link
Member

randy3k commented Dec 23, 2017

But it may be useful to catch the error and link users to this issue.

@gerardroche
Copy link
Contributor Author

+1 for deprecating it, add a link to the issue.

Also, I see that the url has changed from randy2k to SublimeText. Maybe add bold notice at the top of readme to notify users of the change.

@randy3k
Copy link
Member

randy3k commented Dec 23, 2017

I have just added a message

if [ "$TRAVIS_OS_NAME" = "linux" ] && [ -z $DISPLAY ]; then
echo "Xvfb is not running"
echo "check https://github.com/SublimeText/UnitTesting/issues/74"
exit 1
fi

@randy3k randy3k closed this as completed Dec 23, 2017
@gerardroche
Copy link
Contributor Author

gerardroche commented Dec 23, 2017

In the example there is some install code in the after_success section. Is there are specific reason for this? I generally move that to before bootstrap in the install section e.g.:

install:
    - if [ "$TRAVIS_OS_NAME" == "linux" ]; then
            pip install flake8;
            pip install flake8-docstrings;
            pip install python-coveralls;
      elif [ "$TRAVIS_OS_NAME" == "osx" ]; then
            brew update;
            brew install python3;
            pip3 install flake8;
            pip3 install flake8-docstrings;
            pip3 install python-coveralls;
      fi
    - sh travis.sh bootstrap

@randy3k
Copy link
Member

randy3k commented Dec 23, 2017

Added a note about the repo relocation.
https://github.com/SublimeText/UnitTesting#unittesting

Is there are specific reason for this?

python-coveralls is only needed when the build successes. It is not necessary to install time it if the build fails. Thus it will shorten the notification time.

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

No branches or pull requests

2 participants