Skip to content
This repository has been archived by the owner on Oct 25, 2024. It is now read-only.

Use Travis-ci to run the tests for you #90

Open
alessandrofelder opened this issue Nov 5, 2020 · 5 comments
Open

Use Travis-ci to run the tests for you #90

alessandrofelder opened this issue Nov 5, 2020 · 5 comments
Labels

Comments

@alessandrofelder
Copy link
Collaborator

alessandrofelder commented Nov 5, 2020

Use CI to run the tests for you.

It's always possible that we forget to run the tests before pushing to GitHub. Luckily, continuous integration platforms can help us catch failing tests even when we do forget to run them.
In this exercise, you will use Travis-CI to do exactly this.

Set up Travis-ci to run our tests for every commit we push to our repository.

If you're done with this issue, try to add test coverage (first locally, then on Travis) by working on this related issue: #91

Sample solution to this issue and to #91: the .travis.yml file might look something like this.

twemyss added a commit to twemyss/rse-classwork-2020 that referenced this issue Nov 5, 2020
twemyss added a commit to twemyss/rse-classwork-2020 that referenced this issue Nov 5, 2020
TomSwift1 added a commit to TomSwift1/rse-classwork-2020 that referenced this issue Nov 5, 2020
ucapgum referenced this issue in ucapgum/rse-classwork-2020 Nov 5, 2020
@twemyss
Copy link

twemyss commented Nov 5, 2020

Just in case anyone is struggling with this issue - it's worth noting that for automated testing to work when you push to GitHub, if you haven't specified in .travis.yml which branches to build, then "for historical reasons .travis.yml needs to be present on all active branches of your project" https://docs.travis-ci.com/user/customizing-the-build

@cristinafni
Copy link

cristinafni commented Nov 5, 2020

@twemyss Hi, I am not sure I understand correctly.
If all my files for testing including the travis yml file, are on the testing branch should I have it on the main branch as well even though I am not really using the main branch for the tests? Also, is that why on travis, my build is still set as "unknown"? Thanks in advance.

@ucapgum
Copy link

ucapgum commented Nov 5, 2020

@cristinafni For me it's working with .travis.yml only in the testing branch. I also get the build as "unknown" even though it is passing.

@twemyss
Copy link

twemyss commented Nov 5, 2020

@cristinafni @ucapgum Ah glad to hear it's working - I had the issue that it wouldn't even automatically build my testing branch (I checked by choosing the branch in travis and then looked for builds) until I also added .travis.yml onto the main branch (even though I wasn't using the main branch for the tests), but if it's working anyway then that's great. I think the badge in travis will always show "unknown" because it shows the main branch only - but I could be wrong there.

umitozmen referenced this issue in umitozmen/rse-classwork-2020 Nov 6, 2020
nikoSchoinas pushed a commit to nikoSchoinas/rse-classwork-2020 that referenced this issue Nov 10, 2020
@nikoSchoinas
Copy link

#90 (comment)

It seems that the problem occurs when you add .travis.yml file inside week05-testing folder (or any folder in the branch). For some reason Travis CI can't access it. The solution is to add the .travis.yml file to the testing branch, alongside with README.md and week05-testing, and not in a file.

i-gayo added a commit to i-gayo/rse-classwork-2020 that referenced this issue Nov 13, 2020
DavidScobie referenced this issue in DavidScobie/rse-classwork-2020 Nov 16, 2020
liamchalcroft added a commit to liamchalcroft/rse-classwork-2020 that referenced this issue Nov 18, 2020
aixixu pushed a commit to aixixu/rse-classwork-2020 that referenced this issue Nov 19, 2020
rmapjs1 added a commit to rmapjs1/rse-classwork-2020 that referenced this issue Dec 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants