Travis-ci script test without commit on github

Always that I need to test some changes in the .travis file I need to push my commit on github, and if that fails, this is a problem I would like to know if there is any way to check my .travis file before committing it, preferably on travis-ci vm, this means that I want to make a process that travis does when I click on any commti on github, but without having to make or change my changes.

+5
source share
1 answer

You can run Travis-CI locally in the travis-ci.yml image to test the travis-ci.yml configuration file.

See " How to run TravisCI locally on Docker : you can open travis bash with

 docker run -it -u travis quay.io/travisci/travis-jvm /bin/bash 

In this article, we will tell you that a local instance of Travis is available for your GitHub repository, but in your case you can make an image of dockers (based on one of Travis-CI ), which will mount the local repo folder on your computer and be able to make travis compile in this mounted folder in the container.

If the test passes in your local Travis-CI, you can redirect your local commits to the GitHub repository.

+6
source

Source: https://habr.com/ru/post/1267168/


All Articles