name: Elixir CI

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        elixir: ['1.12', '1.11', '1.10', '1.9']
        otp: ['24.0', '23.x', '22.x']
        exclude:
          - elixir: '1.9'
            otp: '24.0'
          - elixir: '1.10'
            otp: '24.0'
    steps:
      - uses: actions/checkout@v2

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

      - name: Restore dependencies cache
        uses: actions/cache@v2
        id: cache-elixir-deps
        with:
          path: |
            deps
            _build
          key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
          restore-keys: ${{ runner.os }}-mix-

      - name: Install Dependencies
        if: steps.cache-elixir-deps.outputs.cache-hit != 'true'
        run: MIX_ENV=test mix do deps.get, deps.compile, compile

      - name: Run Tests
        run: mix test

name: Elixir CI

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        elixir: ['1.12', '1.11', '1.10']
        otp: ['24.0', '23.x', '22.x']
        exclude:
          - elixir: '1.10'
            otp: '24.0'
    steps:
      - uses: actions/checkout@v2

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

      - name: Restore dependencies cache
        uses: actions/cache@v2
        id: cache-elixir-deps
        with:
          path: |
            deps
            _build
          key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
          restore-keys: ${{ runner.os }}-mix-

      - name: Install Dependencies
        if: steps.cache-elixir-deps.outputs.cache-hit != 'true'
        run: MIX_ENV=test mix do deps.get, deps.compile, compile

      - name: Run Tests
        run: mix test

Remove Elixir 1.9 from CI
Remove Elixir 1.9 from CI