name: cluster_ansible
'on':
  schedule:
    - cron: "0 12 * * *"
  #push:
    #branches: [ macos11 ]

jobs:

  zmq_cluster:
    name: Molecule
    runs-on: ubuntu-latest
    strategy:
      matrix:
        distro:
          - ubuntu1804
          - ubuntu2004
    env:
      working-directory: ./ansible/cluster

    steps:
      - name: Check out the codebase.
        uses: actions/checkout@v2

      - name: Set up Python 3.
        uses: actions/setup-python@v2
        with:
          python-version: '3.8'

      - name: Install test dependencies.
        run: pip3 install molecule[docker,ansible,lint]

      - name: Run Molecule tests.
        run: molecule test --destroy=never -- -vv
        working-directory: ${{env.working-directory}}
        env:
          PY_COLORS: '1'
          ANSIBLE_FORCE_COLOR: '1'
          MOLECULE_DISTRO: ${{ matrix.distro }}