From 0be43f43ad1fffe948dbf6341a9d036a56413ba9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Eppl=C3=A9e?= Date: Mon, 21 Apr 2025 12:49:50 +0200 Subject: [PATCH] Set up basic CI --- .drone.yml | 18 +++++++++++++----- .editorconfig | 5 +++++ Justfile | 6 +++++- lib/mv_web/components/layouts/root.html.heex | 2 +- 4 files changed, 24 insertions(+), 7 deletions(-) create mode 100644 .editorconfig diff --git a/.drone.yml b/.drone.yml index ea5228a..122a453 100644 --- a/.drone.yml +++ b/.drone.yml @@ -2,9 +2,17 @@ kind: pipeline type: docker name: default +services: + - name: postgres + image: docker.io/library/postgres:17.2 + steps: -- name: greeting - image: alpine - commands: - - echo hello - - echo world + - name: lint & test + image: docker.io/library/elixir:1.18.3-otp-27 + commands: + # Install hex package manager + - mix local.hex --force + # Check for compilation errors & warnings + - mix compile --warnings-as-errors + # Check formatting + - mix format --check-formatted diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..867ea98 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,5 @@ +root = true + +[*.yml] +indent_size = 2 +indent_style = space \ No newline at end of file diff --git a/Justfile b/Justfile index 3e5fe17..3855809 100644 --- a/Justfile +++ b/Justfile @@ -8,4 +8,8 @@ migrate-database: mix ash.setup reset-database: - mix ash.reset \ No newline at end of file + mix ash.reset + +ci-dev: + mix compile --warnings-as-errors + mix format --check-formatted \ No newline at end of file diff --git a/lib/mv_web/components/layouts/root.html.heex b/lib/mv_web/components/layouts/root.html.heex index 2c2230d..9857506 100644 --- a/lib/mv_web/components/layouts/root.html.heex +++ b/lib/mv_web/components/layouts/root.html.heex @@ -1,7 +1,7 @@ - <%= Application.get_env(:live_debugger, :live_debugger_tags) %> + {Application.get_env(:live_debugger, :live_debugger_tags)}