Refactor mix.exs for improved readability; format description and ext… #7
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: CI | |
on: | |
push: | |
branches: [main, develop] | |
pull_request: | |
branches: [main] | |
jobs: | |
test: | |
name: Build and Test | |
runs-on: ubuntu-latest | |
env: | |
MIX_ENV: test | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Elixir | |
uses: erlef/setup-beam@v1 | |
with: | |
elixir-version: '1.18.x' | |
otp-version: '27.x' | |
- name: Cache deps | |
uses: actions/cache@v3 | |
with: | |
path: deps | |
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }} | |
restore-keys: ${{ runner.os }}-mix- | |
- name: Install dependencies | |
run: mix deps.get | |
- name: Check formatting | |
run: mix format --check-formatted | |
- name: Compile with warnings as errors | |
run: mix compile --warnings-as-errors | |
- name: Run tests | |
run: mix test | |
- name: Run Credo | |
run: mix credo --strict | |
- name: Code Coverage | |
run: mix coveralls.github | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |