---
on: [push, pull_request]

jobs:
  Lint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Run ansible-lint
        uses: ansible-community/ansible-lint-action@main
  Tests:
    name: Test role
    runs-on: ubuntu-20.04
    strategy:
      fail-fast: false
      matrix:
        ansible:
          - "2.11"
          - "2.12"
          - "2.13"
        scenario:
          - dnsdist-14
          - dnsdist-15
          - dnsdist-16
          - dnsdist-master
    steps:
      - name: checkout
        uses: actions/checkout@v2
      - name: Install python
        uses: actions/setup-python@v2
        with:
          python-version: "3.10"
      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          pip install tox tox-gh-actions
      - name: Run the tests
        run: tox -- molecule test -s ${{ matrix.scenario }}
        env:
          ANSIBLE: ${{ matrix.ansible }}

---
on: [push, pull_request]

jobs:
  Lint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Run ansible-lint
        uses: ansible-community/ansible-lint-action@main
  Tests:
    name: Test role
    runs-on: ubuntu-20.04
    strategy:
      fail-fast: false
      matrix:
        ansible:
          - "2.11"
          - "2.12"
          - "2.13"
        scenario:
          - dnsdist-14
          - dnsdist-15
          - dnsdist-16
          - dnsdist-17
          - dnsdist-master
    steps:
      - name: checkout
        uses: actions/checkout@v2
      - name: Install python
        uses: actions/setup-python@v2
        with:
          python-version: "3.10"
      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          pip install tox tox-gh-actions
      - name: Run the tests
        run: tox -- molecule test -s ${{ matrix.scenario }}
        env:
          ANSIBLE: ${{ matrix.ansible }}

Add test for dnsdist 17
Add test for dnsdist 17
