name: Main workflow

on:
  - pull_request
  - push

jobs:
  build:
    services:
      rabbitmq:
        image: rabbitmq
        ports:
        - 5672/tcp

    strategy:
      fail-fast: false
      matrix:
        os:
          - ubuntu-latest
        ocaml-version:
          - 4.12.0
          - 4.05.0
        concurrency:
          - async
          - lwt

    runs-on: ${{ matrix.os }}

    steps:
      - name: Checkout code
        uses: actions/checkout@v2

      - name: Use OCaml ${{ matrix.ocaml-version }}
        uses: avsm/setup-ocaml@v1
        with:
          ocaml-version: ${{ matrix.ocaml-version }}

      - run: opam pin . --no-action
      - run: opam install amqp-client amqp-client-${{ matrix.concurrency }} --deps-only --with-doc --with-test
      - run: opam exec -- dune build -p amqp-client,amqp-client-${{ matrix.concurrency }}
      - run: opam exec -- dune runtest -p amqp-client,amqp-client-${{ matrix.concurrency }}

      - run: opam exec -- dune build @integration -p amqp-client,amqp-client-${{ matrix.concurrency }}
        env:
          AMQP_PORT: ${{ job.services.rabbitmq.ports[5672] }}

name: Main workflow

on:
  - pull_request
  - push

jobs:
  build:
    services:
      rabbitmq:
        image: rabbitmq
        ports:
        - 5672/tcp

    strategy:
      fail-fast: false
      matrix:
        os:
          - ubuntu-latest
        ocaml-compiler:
          - 4.12.0
          - 4.05.0
        concurrency:
          - async
          - lwt

    runs-on: ${{ matrix.os }}

    steps:
      - name: Checkout code
        uses: actions/checkout@v2

      - name: Use OCaml ${{ matrix.ocaml-compiler }}
        uses: avsm/setup-ocaml@v1
        with:
          ocaml-compiler: ${{ matrix.ocaml-compiler }}

      - run: opam pin . --no-action
      - run: opam install amqp-client amqp-client-${{ matrix.concurrency }} --deps-only --with-doc --with-test
      - run: opam exec -- dune build -p amqp-client,amqp-client-${{ matrix.concurrency }}
      - run: opam exec -- dune runtest -p amqp-client,amqp-client-${{ matrix.concurrency }}

      - run: opam exec -- dune build @integration -p amqp-client,amqp-client-${{ matrix.concurrency }}
        env:
          AMQP_PORT: ${{ job.services.rabbitmq.ports[5672] }}

Update ocaml-version to ocaml-compiler for ocaml setup action
Update ocaml-version to ocaml-compiler for ocaml setup action
