From 5ea07faa8e143ecb5d3c7d892093690f4c0c784f Mon Sep 17 00:00:00 2001 From: Clifton McIntosh Date: Tue, 3 Dec 2024 09:46:29 -0600 Subject: [PATCH] Define separate check_format job in CI --- .github/workflows/ci.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6be542f..374f1f0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -126,3 +126,31 @@ jobs: - name: Run dialyzer run: mix dialyzer --format github --format dialyxir + + check_format: + runs-on: ubuntu-22.04 + env: + MIX_ENV: test + + steps: + - uses: actions/checkout@v4 + + - name: Set up Elixir + id: beam + uses: erlef/setup-beam@v1 + with: + elixir-version: 1.16 + otp-version: 26 + + - uses: actions/cache@v4 + with: + path: | + deps + _build + key: deps-${{ runner.os }}-${{ steps.beam.outputs.otp-version }}-${{ steps.beam.outputs.elixir-version }}-${{ hashFiles('**/mix.lock') }} + restore-keys: | + deps-${{ runner.os }}-${{ steps.beam.outputs.otp-version }}-${{ steps.beam.outputs.elixir-version }} + + - run: mix deps.get + + - run: mix format --check-formatted