From 79e83afafba9c914416c428d0cd7cb854d1e5c26 Mon Sep 17 00:00:00 2001 From: Pascal Schmid Date: Sun, 20 Feb 2022 22:43:29 +0100 Subject: [PATCH] Setup Gitlab CI --- .gitlab-ci.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fef13ef..59d8561 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -11,3 +11,27 @@ sast: stage: test include: - template: Security/SAST.gitlab-ci.yml + +.elixir: &elixir + image: elixir:1.13 + before_script: + - mix local.hex --force + - mix local.rebar --force + - mix deps.get --only $MIX_ENV + +lint:elixir: + extends: .elixir + stage: test + variables: + MIX_ENV: test + script: + - mix compile --warnings-as-errors --force + - mix format --check-formatted + +test:elixir: + extends: .elixir + stage: test + variables: + MIX_ENV: test + script: + - mix test