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

Some cleanup of tests and test artifacts #451

Merged
merged 2 commits into from
Apr 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion test/support/apps/phx1_7/bin/test
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ function cleanup() {
rm -rf lib/phx1_7_web/views/post_view.ex
rm -rf test/phx1_7_web/controllers/post_controller_test.exs
rm -rf test/support/fixtures/
rm -rf lib/phx1_7_web/components/layouts/torch.html.heex
rm -rf lib/phx1_7_web/controllers/post_html.ex
rm -rf lib/phx1_7_web/controllers/post_html/

patch -i ../../patches/install-torch.diff -p 1 -R
patch -i ../../patches/install-route.diff -p 1 -R
}
Expand All @@ -22,8 +26,8 @@ mix deps.get || { cleanup; echo 'Dependencies could not be fetched!'; exit 1; }
MIX_ENV=test mix ecto.drop || { cleanup; echo 'Database could not be dropped'; exit 1; }
MIX_ENV=test mix torch.install || { cleanup; echo 'Torch could not be installed!'; exit 1; }
MIX_ENV=test mix torch.gen.html Blog Post posts title:string published:boolean published_at:datetime views:integer || { echo 'Torch files not generated!'; exit 1; }
MIX_ENV=test mix ecto.setup || { cleanup; echo 'Torch database could not be setup!'; exit 1; }
patch -i ../../patches/install-route.diff -p 1
MIX_ENV=test mix ecto.setup || { cleanup; echo 'Torch database could not be setup!'; exit 1; }
MIX_ENV=test mix test || { echo 'Tests failed!'; cleanup; exit 1; }

# Ensure that put_root_layout is used by default on > Phx 1.5
Expand Down
Loading