Skip to content

Merge pull request #16 from oshosanya/update-docs #31

Merge pull request #16 from oshosanya/update-docs

Merge pull request #16 from oshosanya/update-docs #31

Workflow file for this run

name: Tests
on:
pull_request:
push:
branches: [master]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
elixir: [1.12.2, 1.14.3]
otp: [24.0]
meilisearch: [1.0.0, 1.0.1]
steps:
- uses: actions/checkout@v2
- name: Setup elixir
uses: erlef/setup-elixir@v1
with:
elixir-version: ${{ matrix.elixir }}
otp-version: ${{ matrix.otp }}
- name: Retrieve Mix Dependencies Cache
uses: actions/cache@v1
id: mix-cache
with:
path: deps
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
- 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: Run Credo
run: mix credo
- name: Meilisearch Docker setup
run: docker run -d -p 7700:7700 getmeili/meilisearch:v${{ matrix.meilisearch }} ./meilisearch --master-key=test_api_key --no-analytics=true
- name: Run Tests
run: mix test
- name: Retrieve PLT Cache
uses: actions/cache@v1
id: plt-cache
with:
path: priv/plts
key: ${{ 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 priv/plts
mix dialyzer --plt
- name: Run dialyzer
run: mix dialyzer --no-check --halt-exit-status