Skip to content

feat: umbrella app

feat: umbrella app #4

Workflow file for this run

name: ci
on:
push:
branches:
- main
pull_request:
env:
MIX_ENV: test
jobs:
deps:
name: Dependencies
runs-on: ubuntu-latest
strategy:
matrix:
elixir: [1.15.7]
otp: [26.1.2]
steps:
- id: cache
uses: actions/cache@v3
with:
key: ${{ runner.os }}-mix-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }}
restore-keys: |
${{ runner.os }}-mix-${{ matrix.elixir }}
path: |
deps
_build
~/.mix
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: erlef/setup-beam@v1
with:
elixir-version: ${{ matrix.elixir }}
otp-version: ${{ matrix.otp }}
- run: |
mix local.rebar --force
mix local.hex --force
- run: mix do deps.get, deps.compile
- run: mix compile
compile:
name: Check compile warning
runs-on: ubuntu-latest
needs:
- deps
strategy:
matrix:
elixir: [1.15.7]
otp: [26.1.2]
steps:
- id: cache
uses: actions/cache@v3
with:
key: ${{ runner.os }}-mix-${{ matrix.elixir }}
path: |
deps
_build
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: erlef/setup-beam@v1
with:
elixir-version: ${{ matrix.elixir }}
otp-version: ${{ matrix.otp }}
- run: mix compile --warnings-as-errors
format:
name: Code format
runs-on: ubuntu-latest
needs:
- deps
strategy:
matrix:
elixir: [1.15.7]
otp: [26.1.2]
steps:
- id: cache
uses: actions/cache@v3
with:
key: ${{ runner.os }}-mix-${{ matrix.elixir }}
path: |
deps
_build
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: erlef/setup-beam@v1
with:
elixir-version: ${{ matrix.elixir }}
otp-version: ${{ matrix.otp }}
- run: mix format --check-formatted
credo:
name: Static Code Analysis
runs-on: ubuntu-latest
needs:
- deps
strategy:
matrix:
elixir: [1.15.7]
otp: [26.1.2]
steps:
- id: cache
uses: actions/cache@v3
with:
key: ${{ runner.os }}-mix-${{ matrix.elixir }}
path: |
deps
_build
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: erlef/setup-beam@v1
with:
elixir-version: ${{ matrix.elixir }}
otp-version: ${{ matrix.otp }}
- run: mix credo --strict
dialyzer:
name: Dialyzer
runs-on: ubuntu-latest
needs:
- deps
strategy:
matrix:
elixir: [1.15.7]
otp: [26.1.2]
steps:
- id: cache
uses: actions/cache@v3
with:
key: ${{ runner.os }}-mix-${{ matrix.elixir }}
path: |
deps
_build
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: erlef/setup-beam@v1
with:
elixir-version: ${{ matrix.elixir }}
otp-version: ${{ matrix.otp }}
- run: mix dialyzer --no-check
test:
name: Run tests
runs-on: ubuntu-latest
needs:
- deps
strategy:
matrix:
elixir: [1.15.7]
otp: [26.1.2]
steps:
- id: cache
uses: actions/cache@v3
with:
key: ${{ runner.os }}-mix-${{ matrix.elixir }}
path: |
deps
_build
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: erlef/setup-beam@v1
with:
elixir-version: ${{ matrix.elixir }}
otp-version: ${{ matrix.otp }}
- run: mix test