-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmix.exs
More file actions
135 lines (119 loc) · 3.08 KB
/
mix.exs
File metadata and controls
135 lines (119 loc) · 3.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
defmodule Singularity.Workflow.MixProject do
use Mix.Project
def project do
[
app: :singularity_workflow,
version: "0.1.5",
elixir: "~> 1.14",
start_permanent: Mix.env() == :prod,
deps: deps(),
docs: docs(),
package: package(),
dialyzer: dialyzer(),
aliases: aliases(),
test_coverage: [tool: ExCoveralls]
]
end
def cli do
[
preferred_envs: [
coveralls: :test,
"coveralls.detail": :test,
"coveralls.post": :test,
"coveralls.html": :test
]
]
end
def application do
[
extra_applications: [:logger]
]
end
defp deps do
[
# JSON handling
dep(:jason, "~> 1.4"),
# Observability
dep(:telemetry, "~> 1.0"),
# Development and testing
dep(:mox, "~> 1.2", only: :test),
# pgmq client
dep(:pgmq, "~> 0.4"),
# Job queue for background processing
dep(:oban, "~> 2.17"),
# Code quality and security (dev only)
dep(:credo, "~> 1.7", only: [:dev, :test], runtime: false),
dep(:dialyxir, "~> 1.4", only: [:dev, :test], runtime: false),
dep(:sobelow, "~> 0.13", only: [:dev, :test], runtime: false),
dep(:excoveralls, "~> 0.18", only: :test)
# Documentation
# Disabled in CI due to proxy TLS issues fetching Hex packages
# {:ex_doc, "~> 0.34", only: :dev, runtime: false}
]
end
defp docs do
[
main: "Singularity.Workflow",
source_url: "https://github.com/Singularity-ng/singularity-workflows",
extras: ["README.md"]
]
end
defp package do
[
name: "singularity_workflow",
description: "PostgreSQL-based workflow orchestration library for Elixir",
licenses: ["MIT"],
links: %{
"GitHub" => "https://github.com/Singularity-ng/singularity-workflows",
"Documentation" => "https://hexdocs.pm/singularity_workflow"
},
maintainers: ["Mikko H"],
files: ~w(lib .formatter.exs mix.exs README.md LICENSE.md)
]
end
defp dialyzer do
[
plt_file: {:no_warn, "priv/plts/dialyzer.plt"},
plt_add_apps: [:mix, :ex_unit]
]
end
defp aliases do
[
# Code quality tasks
quality: [
"format --check-formatted",
"credo --strict",
"dialyzer",
"sobelow --exit-on-warning",
"deps.audit"
],
# Fix code quality issues
"quality.fix": [
"format",
"credo --strict --fix"
],
# Setup tasks
setup: ["deps.get", "ecto.create", "ecto.migrate"],
# Testing
"test.watch": ["test --listen-on-stdin"],
"test.coverage": ["coveralls.html"]
]
end
defp dep(app, requirement, opts \\ []) do
if bootstrap_deps?() do
opts
|> Keyword.put(:path, Path.join("deps", Atom.to_string(app)))
|> Keyword.put_new(:override, true)
|> then(&{app, &1})
else
if opts == [] do
{app, requirement}
else
{app, requirement, opts}
end
end
end
defp bootstrap_deps? do
System.get_env("BOOTSTRAP_HEX_DEPS") in ["1", "true"]
end
end