From f1bd095386b6f7c5d83463077f2568a9a1ecc177 Mon Sep 17 00:00:00 2001 From: Terence Ponce Date: Sat, 17 Feb 2024 15:20:31 +0000 Subject: [PATCH] Add CI badge and command for GitHub Actions (#3) Forgot to add this in the previous PR. --- .github/workflows/ci.yml | 3 +++ README.md | 4 +++- lib/dash_float_web/router.ex | 1 - mix.exs | 4 +++- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6542f4f..8d5f49f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -77,5 +77,8 @@ jobs: - name: Compile run: mix compile --warnings-as-errors + - name: Run Linter + run: mix lint.ci + - name: Run Tests run: mix test diff --git a/README.md b/README.md index 423953f..5f17de0 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ -# DashFloat +# DashFloat API + +[![gh-actions](https://github.com/DashFloat/api/workflows/CI/badge.svg)](https://github.com/DashFloat/api/actions?workflow=CI) To start your Phoenix server: diff --git a/lib/dash_float_web/router.ex b/lib/dash_float_web/router.ex index 3ca5098..8cc5b4b 100644 --- a/lib/dash_float_web/router.ex +++ b/lib/dash_float_web/router.ex @@ -11,7 +11,6 @@ defmodule DashFloatWeb.Router do # Enable Swoosh mailbox preview in development if Application.compile_env(:dash_float, :dev_routes) do - scope "/dev" do pipe_through [:fetch_session, :protect_from_forgery] diff --git a/mix.exs b/mix.exs index 9c34860..d7bdb1e 100644 --- a/mix.exs +++ b/mix.exs @@ -58,7 +58,9 @@ defmodule DashFloat.MixProject do setup: ["deps.get", "ecto.setup"], "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"] + test: ["ecto.create --quiet", "ecto.migrate --quiet", "test"], + lint: ["format"], + "lint.ci": ["format --check-formatted"] ] end end