-
Notifications
You must be signed in to change notification settings - Fork 0
/
mix.exs
96 lines (86 loc) · 2.19 KB
/
mix.exs
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
defmodule GithubWorkflowsGenerator.MixProject do
use Mix.Project
@repo "https://github.com/optimumBA/github_workflows_generator"
@version "0.1.3"
def project do
[
app: :github_workflows_generator,
version: @version,
elixir: "~> 1.13",
start_permanent: Mix.env() == :prod,
aliases: aliases(),
deps: optimum_deps() ++ app_deps(),
# Hex package
description: "Generate GitHub Actions workflows",
package: package(),
# CI
dialyzer: [
plt_add_apps: [:ex_unit, :mix],
plt_file: {:no_warn, "priv/plts/dialyzer.plt"}
],
preferred_cli_env: [
ci: :test,
coveralls: :test,
"coveralls.detail": :test,
"coveralls.html": :test,
credo: :test,
dialyzer: :test
],
test_coverage: [tool: ExCoveralls],
# Docs
name: "GithubWorkflowsGenerator",
source_url: @repo,
docs: [
extras: ["README.md"],
main: "readme",
source_ref: "v#{@version}"
]
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: [:logger]
]
end
defp package do
[
licenses: ["MIT"],
links: %{"GitHub" => @repo},
maintainers: ["Almir Sarajčić"]
]
end
# Run "mix help deps" to learn about dependencies.
defp optimum_deps do
[
{:credo, "~> 1.7", only: :test, runtime: false},
{:dialyxir, "~> 1.4", only: :test, runtime: false},
{:doctest_formatter, "~> 0.3", only: [:dev, :test], runtime: false},
{:ex_doc, "~> 0.34", only: :dev, runtime: false},
{:excoveralls, "~> 0.18", only: :test},
{:mix_audit, "~> 2.1", only: :test, runtime: false}
]
end
defp app_deps do
[]
end
defp aliases do
[
setup: [
"deps.get",
"cmd npm i -D prettier prettier-plugin-toml"
],
ci: [
"deps.unlock --check-unused",
"deps.audit",
"hex.audit",
"format --check-formatted",
"cmd npx prettier -c .",
"credo --strict",
"dialyzer",
"test --cover --warnings-as-errors"
],
prettier: ["cmd npx prettier -w ."]
]
end
end