Allow for specifying checks in mix config #53
Workflow file for this run
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: Lints | |
on: | |
pull_request: | |
branches: [ master ] | |
jobs: | |
store-pr: | |
name: Store PR number | |
runs-on: ubuntu-latest | |
steps: | |
- name: Save PR number | |
run: | | |
mkdir -p ./pr | |
echo ${{ github.event.number }} > ./pr/NR | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: pr | |
path: pr/ | |
formatting: | |
name: Check formatting (invalid/format) | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Elixir | |
uses: erlef/setup-beam@v1 | |
with: | |
otp-version: '24.0' | |
elixir-version: '1.12.1' | |
rebar3-version: '3.15.2' | |
- name: Restore dependencies cache | |
uses: actions/cache@v2 | |
with: | |
path: deps | |
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }} | |
restore-keys: ${{ runner.os }}-mix- | |
- name: Fetch dependencies | |
run: mix deps.get | |
- name: Check formatting | |
run: mix format --check-formatted | |
credo: | |
name: Check our credo (invalid/credo) | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Elixir | |
uses: erlef/setup-beam@v1 | |
with: | |
otp-version: '24.0' | |
elixir-version: '1.12.1' | |
rebar3-version: '3.15.2' | |
- name: Restore dependencies cache | |
uses: actions/cache@v2 | |
with: | |
path: deps | |
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }} | |
restore-keys: ${{ runner.os }}-mix- | |
- name: Install dependencies | |
run: mix do deps.get, deps.compile | |
- name: Run Credo | |
run: mix credo --all |