aaronrenner / phx_gen_auth

An authentication system generator for Phoenix 1.5 applications.
774 stars 56 forks source link

Can we start a CONTRIBUTING.md document? #50

Closed zorn closed 4 years ago

zorn commented 4 years ago

I've started work on a PR for the previously discussed "email" change. I am currently not able to run the test to verify I am not breaking anything. I feel like I missing the whole picture of what it takes to run the tests for this repo locally.

First had to get over an error about :phx_new compilations by installing a local version of :phx_new per the linked instructions below.

could not compile dependency :phx_new, "mix compile" failed. You can recompile this dependency with "mix deps.compile phx_new", update it with "mix deps.update phx_new" or clean it with "mix deps.clean phx_new"

https://github.com/phoenixframework/phoenix/blob/master/installer/README.md

I am not running into error running the tests like:

error: pathspec '.' did not match any file(s) known to git

And

1) test does not allow generator to be run at the umbrella root (Phx.Gen.Auth.IntegrationTests.DefaultUmbrellaTest)
     test/mix/tasks/phx_gen_auth/integration_tests/default_umbrella_test.exs:33
     ** (MatchError) no match of right hand side value: {"", 1}
     stacktrace:
       (phx_gen_auth 0.4.0) test/support/integration_test_helpers.ex:150: Phx.Gen.Auth.TestSupport.IntegrationTestHelpers.revert_to_clean_phoenix_app/1
       (phx_gen_auth 0.4.0) test/support/integration_test_helpers.ex:35: Phx.Gen.Auth.TestSupport.IntegrationTestHelpers.setup_test_umbrella_app/2
       test/mix/tasks/phx_gen_auth/integration_tests/default_umbrella_test.exs:12: Phx.Gen.Auth.IntegrationTests.DefaultUmbrellaTest.__ex_unit_setup_0/1
       test/mix/tasks/phx_gen_auth/integration_tests/default_umbrella_test.exs:1: Phx.Gen.Auth.IntegrationTests.DefaultUmbrellaTest.__ex_unit__/2

I suspect I may need to running this in a Docker container but I'm still very new to that.

ANYWAYS. If we could work on a document on how to stand up this project for local editing that would be very helpful. Thanks!

aaronrenner commented 4 years ago

That's a great idea. It may take me a couple days to get to, but I can put together some instructions for running tests.

In your case, it sounds like one of your test apps got in a weird state. Try running rm -rf test_apps from the root of phx_gen_auth and running the tests again after that.

You can also push your changes to your fork on github and it should automatically build via Github Actions.

zorn commented 4 years ago

No rush, but happy to hear it will be on your radar. I will probably try out your notes on Friday or so.

aaronrenner commented 4 years ago

Closing in favor of #52

@zorn Please let me know if the instructions in this PR work for you.