Skip to content

Instantly share code, notes, and snippets.

@theguuholi
Created August 18, 2022 10:01
Show Gist options
  • Save theguuholi/e54624dc3ca1a99fbd28921b98e0a8a8 to your computer and use it in GitHub Desktop.
Save theguuholi/e54624dc3ca1a99fbd28921b98e0a8a8 to your computer and use it in GitHub Desktop.
name: Check Format
on: pull_request
jobs:
check_format:
runs-on: ubuntu-latest
strategy:
matrix:
elixir: [1.13]
otp: [24]
steps:
- uses: actions/checkout@v2
- uses: erlef/setup-elixir@v1
with:
elixir-version: ${{ matrix.elixir }}
otp-version: ${{ matrix.otp }}
- uses: actions/cache@v1
id: mix-format-cache
with:
path: deps
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-mix-${{ hashFiles(format('{0}-{1}', github.workspace, '/mix.lock')) }}
- name: Install Mix Dependencies
if: steps.mix-format-cache.outputs.cache-hit != 'true'
run: mix deps.get
- name: Check Format
run: mix format --check-formatted
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment