Install erlang-dialyzer in workflow #334
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: Elixir CI | |
on: [push, pull_request] | |
jobs: | |
build: | |
name: Build and test | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- elixir: '1.9' | |
otp: '21' | |
- elixir: '1.9' | |
otp: '22' | |
- elixir: '1.10' | |
otp: '21' | |
- elixir: '1.10' | |
otp: '22' | |
- elixir: '1.10' | |
otp: '23' | |
- elixir: '1.11' | |
otp: '21' | |
- elixir: '1.11' | |
otp: '22' | |
- elixir: '1.11' | |
otp: '23' | |
- elixir: '1.11' | |
otp: '24' | |
- elixir: '1.12' | |
otp: '22' | |
- elixir: '1.12' | |
otp: '23' | |
- elixir: '1.12' | |
otp: '24' | |
- elixir: '1.12' | |
otp: '24' | |
- elixir: '1.13' | |
otp: '22' | |
- elixir: '1.13' | |
otp: '23' | |
- elixir: '1.13' | |
otp: '24' | |
- elixir: '1.14' | |
otp: '23' | |
- elixir: '1.14' | |
otp: '24' | |
- elixir: '1.14' | |
otp: '25' | |
- elixir: '1.15' | |
otp: '24' | |
- elixir: '1.15' | |
otp: '25' | |
- elixir: '1.15' | |
otp: '26' | |
- elixir: '1.16' | |
otp: '24' | |
- elixir: '1.16' | |
otp: '25' | |
- elixir: '1.16' | |
otp: '26' | |
- elixir: '1.17' | |
otp: '25' | |
- elixir: '1.17' | |
otp: '26' | |
- elixir: '1.17' | |
otp: '27' | |
lint: lint | |
- elixir: '1.17' | |
otp: '26' | |
deps: latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: nanasess/setup-chromedriver@v2 | |
- name: Set up Elixir | |
uses: erlef/setup-beam@v1 | |
with: | |
elixir-version: ${{ matrix.elixir }} | |
otp-version: ${{ matrix.otp }} | |
- name: Retrieve Mix Dependencies Cache | |
if: matrix.deps != 'latest' | |
uses: actions/cache@v1 | |
id: mix-cache | |
with: | |
path: deps | |
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-mix-${{ hashFiles('mix.lock') }} | |
- name: Remove mix.lock | |
if: matrix.deps == 'latest' | |
run: rm mix.lock | |
- name: Install dependencies | |
if: steps.mix-cache.outputs.cache-hit != 'true' | |
run: mix deps.get | |
- name: Retrieve PLT Cache | |
uses: actions/cache@v1 | |
id: plt-cache | |
with: | |
path: priv/plts | |
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-plts-v2-${{ hashFiles('mix.lock') }} | |
if: ${{ matrix.lint }} | |
- name: Create PLTs | |
run: | | |
apt-get install erlang-dialyzer | |
mkdir -p priv/plts | |
mix dialyzer --plt | |
if: ${{ matrix.lint }} | |
- name: Check quality | |
run: | | |
apt-get install erlang-dialyzer | |
mix format --check-formatted | |
mix credo --strict | |
mix dialyzer --no-check | |
mix e2e | |
if: ${{ matrix.lint }} | |
- name: Run tests | |
run: mix test | |
- name: Run e2e test | |
run: mix e2e | |
if: ${{ matrix.lint }} |