dwyl / phoenix-ecto-append-only-log-example

📝 A step-by-step example/tutorial showing how to build a Phoenix (Elixir) App where all data is immutable (append only). Precursor to Blockchain, IPFS or Solid!
GNU General Public License v2.0
78 stars 7 forks source link

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

Closed nelsonic closed 5 years ago

nelsonic commented 6 years ago

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 commented 6 years ago

Got mix cover working on localhost on tutorial branch: image

nelsonic commented 6 years ago

https://travis-ci.org/profile/dwyl enabled: image

see: https://travis-ci.org/dwyl/phoenix-ecto-append-only-log-example/builds

nelsonic commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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. 👍