Skip to content

Merge pull request #225 from turnhub/bugfix/has-phonenumber #1336

Merge pull request #225 from turnhub/bugfix/has-phonenumber

Merge pull request #225 from turnhub/bugfix/has-phonenumber #1336

Workflow file for this run

name: Elixir CI
on:
push:
pull_request:
jobs:
build:
name: Build and test
runs-on: ubuntu-latest
strategy:
matrix:
elixir: ["1.15"]
otp: ["26"]
cache_version: ["1"]
steps:
- uses: actions/checkout@v2
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: ${{ matrix.elixir }}
otp-version: ${{ matrix.otp }}
- name: Restore dependencies cache
uses: actions/cache@v2
id: mix-cache
with:
path: deps
key: ${{matrix.cache_version}}-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{matrix.cache_version}}-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-mix-
- name: Install Mix Dependencies
if: steps.mix-cache.outputs.cache-hit != 'true'
run: |
mix local.rebar --force
mix local.hex --force
mix deps.get
- name: Check Formatting
run: mix format --check-formatted
- name: Credo
run: mix credo --strict
- name: Retrieve PLT Cache
uses: actions/cache@v1
id: plt-cache
with:
path: .plts
key: ${{matrix.cache_version}}-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-plts-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
- name: Create PLTs
if: steps.plt-cache.outputs.cache-hit != 'true'
run: |
mkdir -p .plts
mix dialyzer --plt
- name: Run dialyzer
run: mix dialyzer --no-check --halt-exit-status
- name: Run tests
run: mix test