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

Enable Travis-CI for this Project to Confirm Tests are Passing #3

Closed
5 tasks done
nelsonic opened this issue Sep 20, 2018 · 5 comments
Closed
5 tasks done

Enable Travis-CI for this Project to Confirm Tests are Passing #3

nelsonic opened this issue Sep 20, 2018 · 5 comments
Assignees

Comments

@nelsonic
Copy link
Member

nelsonic commented Sep 20, 2018

Tests for #2 (Daniel's PR) currently pass on my Localhost:
image

But we cannot "know" this without checking out the branch and running the tests on localhost ...

Todo

Thanks! 👍

@nelsonic nelsonic added the enhancement New feature or request label Sep 20, 2018
@nelsonic
Copy link
Member Author

Got mix cover working on localhost on tutorial branch:
image

@nelsonic
Copy link
Member Author

nelsonic commented Sep 20, 2018

nelsonic added a commit that referenced this issue Sep 20, 2018
@nelsonic
Copy link
Member Author

Build fails on Travis-CI because it is expecting a "append_only" Postgres user to exist:
https://travis-ci.org/dwyl/phoenix-ecto-append-only-log-example/builds/431146775#L604
image
So we need to create the user on Travis-CI before attempting to run the tests.

@nelsonic
Copy link
Member Author

Thanks to: https://stackoverflow.com/questions/42177055/how-to-set-up-travis-ci-and-postgresql-using-custom-db-credentials
image

it's relatively easy to add a before_script: to the .travis.yml file.
Trying it now:

before_script:
  - psql -c "CREATE USER append_only WITH PASSWORD 'postgres';" -U postgres
  - psql -c "ALTER USER append_only CREATEDB;" -U postgres

@nelsonic
Copy link
Member Author

Build passing: https://travis-ci.org/dwyl/phoenix-ecto-append-only-log-example/builds/431336390
image

We can work on improving the coverage after the tutorial is more complete. 👍

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