Create LICENSE #25
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Compile & Lint | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
# compile and lint with env as test | |
env: | |
MIX_ENV: test | |
jobs: | |
lint: | |
name: Lint with Credo, Mix Format, and Dialyzer | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Elixir | |
uses: erlef/setup-beam@988e02bfe678367a02564f65ca2e37726dc0268f | |
with: | |
elixir-version: '1.14.4' | |
otp-version: '25' | |
- name: Restore dependencies cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
deps | |
_build | |
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }} | |
restore-keys: ${{ runner.os }}-mix- | |
- name: Install dependencies | |
run: mix deps.get | |
- name: compile | |
run: "MIX_ENV=test mix compile" | |
- name: lint (credo) | |
run: "MIX_ENV=test mix credo --strict" | |
- name: lint (mix format) | |
run: mix format --check-formatted | |
- name: lint (dialyzer) | |
run: "MIX_ENV=test mix dialyzer" |