name: CI

on:
  pull_request:
  push:
    branches:
      - master

jobs:
  mix_test:
    runs-on: ubuntu-18.04
    env:
      MIX_ENV: test

    name: Elixir ${{ matrix.pair.elixir }} / OTP ${{ matrix.pair.otp }}

    strategy:
      fail-fast: false
      matrix:
        include:
          - pair:
              elixir: 1.11.2
              otp: 23.1.4
          - pair:
              elixir: 1.12.3
              otp: 24.1.1
            lint: lint
    steps:
      - uses: actions/checkout@v2

      - uses: erlef/setup-beam@v1
        with:
          otp-version: ${{matrix.pair.otp}}
          elixir-version: ${{matrix.pair.elixir}}

      - name: Install minimal stable Rust toolchain
        uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: stable

      - name: Install Dependencies
        run: mix deps.get

      - run: mix format --check-formatted
        if: ${{ matrix.lint }}

      - run: mix deps.unlock --check-unused
        if: ${{ matrix.lint }}

      - run: PACTELIXIR_BUILD=1 mix deps.compile

      - run: PACTELIXIR_BUILD=1 mix compile --warnings-as-errors
        if: ${{ matrix.lint }}

      - run: PACTELIXIR_BUILD=1 mix test

      - run: mix deps.get --only docs

      - run: MIX_ENV=docs mix inch.report

name: CI

on:
  pull_request:
  push:
    branches:
      - master

jobs:
  mix_test:
    runs-on: ubuntu-18.04
    env:
      MIX_ENV: test

    name: Elixir ${{ matrix.pair.elixir }} / OTP ${{ matrix.pair.otp }}

    strategy:
      fail-fast: false
      matrix:
        include:
          - pair:
              elixir: 1.11.2
              otp: 23.1.4
          - pair:
              elixir: 1.12.3
              otp: 24.1.1
            lint: lint
    steps:
      - uses: actions/checkout@v2

      - uses: erlef/setup-beam@v1
        with:
          otp-version: ${{matrix.pair.otp}}
          elixir-version: ${{matrix.pair.elixir}}

      - name: Install minimal stable Rust toolchain
        uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: stable

      - name: Install Dependencies
        run: mix deps.get

      - run: mix format --check-formatted
        if: ${{ matrix.lint }}

      - run: mix deps.unlock --check-unused
        if: ${{ matrix.lint }}

      - run: PACTELIXIR_BUILD=1 mix deps.compile

      # - run: PACTELIXIR_BUILD=1 mix compile --warnings-as-errors
      #   if: ${{ matrix.lint }}

      - run: PACTELIXIR_BUILD=1 mix test

      - run: mix deps.get --only docs

      - run: MIX_ENV=docs mix inch.report

Disable Linting of compiler warnings for now
Disable Linting of compiler warnings for now