Skip to content

Commit

Permalink
Remove ecto and postgresql.
Browse files Browse the repository at this point in the history
  • Loading branch information
fire committed Sep 15, 2024
1 parent f8bcba5 commit 9d3d9f6
Show file tree
Hide file tree
Showing 13 changed files with 1 addition and 124 deletions.
7 changes: 0 additions & 7 deletions .github/workflows/elixir.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,6 @@ jobs:
rustup default nightly
rustup target add riscv64gc-unknown-linux-gnu
- uses: ikalnytskyi/action-setup-postgres@v6
with:
username: cicd
password: web_compiler
database: web_compiler_dev
port: 34837

- name: Install Dependencies
run: |
mix local.hex --force
Expand Down
1 change: 0 additions & 1 deletion config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import Config

config :web_compiler,
ecto_repos: [WebCompiler.Repo],
generators: [timestamp_type: :utc_datetime]

# Configures the endpoint
Expand Down
10 changes: 0 additions & 10 deletions config/dev.exs
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
import Config

# Configure your database
config :web_compiler, WebCompiler.Repo,
username: "cicd",
password: "web_compiler",
hostname: "db_test",
database: "web_compiler_test",
stacktrace: true,
show_sensitive_data_on_connection_error: true,
pool_size: 10

# For development, we disable any cache and enable
# debugging and code reloading.
#
Expand Down
6 changes: 0 additions & 6 deletions config/runtime.exs
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,6 @@ if config_env() == :prod do

maybe_ipv6 = if System.get_env("ECTO_IPV6") in ~w(true 1), do: [:inet6], else: []

config :web_compiler, WebCompiler.Repo,
# ssl: true,
url: database_url,
pool_size: String.to_integer(System.get_env("POOL_SIZE") || "10"),
socket_options: maybe_ipv6

# The secret key base is used to sign/encrypt cookies and other secrets.
# A default value is used in config/dev.exs and config/test.exs but you
# want to use a different value for prod and you most likely don't want
Expand Down
13 changes: 0 additions & 13 deletions config/test.exs
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
import Config

# Configure your database
#
# The MIX_TEST_PARTITION environment variable can be used
# to provide built-in test partitioning in CI environment.
# Run `mix help test` for more information.
config :web_compiler, WebCompiler.Repo,
username: "cicd",
password: "web_compiler",
hostname: "db_test",
database: "web_compiler_test",
pool: Ecto.Adapters.SQL.Sandbox,
pool_size: System.schedulers_online() * 2

# We don't run a server during test. If one is required,
# you can enable the server option below.
config :web_compiler, WebCompilerWeb.Endpoint,
Expand Down
1 change: 0 additions & 1 deletion lib/web_compiler/application.ex
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ defmodule WebCompiler.Application do
def start(_type, _args) do
children = [
WebCompilerWeb.Telemetry,
WebCompiler.Repo,
{DNSCluster, query: Application.get_env(:web_compiler, :dns_cluster_query) || :ignore},
{Phoenix.PubSub, name: WebCompiler.PubSub},
# Start the Finch HTTP client for sending emails
Expand Down
5 changes: 0 additions & 5 deletions lib/web_compiler/repo.ex

This file was deleted.

1 change: 0 additions & 1 deletion lib/web_compiler_web/endpoint.ex
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ defmodule WebCompilerWeb.Endpoint do
socket "/phoenix/live_reload/socket", Phoenix.LiveReloader.Socket
plug Phoenix.LiveReloader
plug Phoenix.CodeReloader
plug Phoenix.Ecto.CheckRepoStatus, otp_app: :web_compiler
end

plug Phoenix.LiveDashboard.RequestLogger,
Expand Down
7 changes: 1 addition & 6 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ defmodule WebCompiler.MixProject do
defp deps do
[
{:phoenix, "~> 1.7.14"},
{:phoenix_ecto, "~> 4.5"},
{:ecto_sql, "~> 3.10"},
{:postgrex, ">= 0.0.0"},
{:phoenix_html, "~> 4.1"},
{:phoenix_live_reload, "~> 1.2", only: :dev},
Expand Down Expand Up @@ -70,10 +68,7 @@ defmodule WebCompiler.MixProject do
# See the documentation for `Mix` for more info on aliases.
defp aliases do
[
setup: ["deps.get", "ecto.setup", "assets.setup", "assets.build"],
"ecto.setup": ["ecto.create", "ecto.migrate", "run priv/repo/seeds.exs"],
"ecto.reset": ["ecto.drop", "ecto.setup"],
test: ["ecto.create --quiet", "ecto.migrate --quiet", "test"],
setup: ["deps.get", "assets.setup", "assets.build"],
"assets.setup": ["tailwind.install --if-missing", "esbuild.install --if-missing"],
"assets.build": ["tailwind web_compiler", "esbuild web_compiler"],
"assets.deploy": [
Expand Down
4 changes: 0 additions & 4 deletions priv/repo/migrations/.formatter.exs

This file was deleted.

11 changes: 0 additions & 11 deletions priv/repo/seeds.exs

This file was deleted.

58 changes: 0 additions & 58 deletions test/support/data_case.ex

This file was deleted.

1 change: 0 additions & 1 deletion test/test_helper.exs
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
ExUnit.start()
Ecto.Adapters.SQL.Sandbox.mode(WebCompiler.Repo, :manual)

0 comments on commit 9d3d9f6

Please sign in to comment.