name: Nightly

on:
  workflow_dispatch:
  schedule:
    - cron: '0 2 * * *'


jobs:
  nightly:
    name: "Python: ${{ matrix.python-version }}
     SQLA: ${{ matrix.sqla-version }}
     CrateDB: ${{ matrix.cratedb-version }}
     on ${{ matrix.os }}"
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: ['ubuntu-20.04', 'ubuntu-22.04', 'macos-11', 'macos-12']
        python-version: ['3.7', '3.8', '3.9', '3.10', '3.11-dev']
        cratedb-version: ['nightly']
        sqla-version: ['latest']
      fail-fast: false
    env:
      CRATEDB_VERSION: ${{ matrix.cratedb-version }}
      SQLALCHEMY_VERSION: ${{ matrix.sqla-version }}

    steps:
      - uses: actions/checkout@v3
      - name: Set up Python ${{ matrix.python-version }}
        uses: actions/setup-python@v4
        with:
          python-version: ${{ matrix.python-version }}
          cache: 'pip'
          cache-dependency-path: 'setup.py'

      - name: Invoke tests
        run: |

          # Propagate build matrix information.
          ./devtools/setup_ci.sh

          # Bootstrap environment.
          source bootstrap.sh

          # Invoke validation tasks.
          flake8 src bin
          coverage run bin/test -vv1

name: Nightly

on:
  workflow_dispatch:
  schedule:
    - cron: '0 2 * * *'


jobs:
  nightly:
    name: "Python: ${{ matrix.python-version }}
     SQLA: ${{ matrix.sqla-version }}
     CrateDB: ${{ matrix.cratedb-version }}
     on ${{ matrix.os }}"
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: ['ubuntu-20.04', 'ubuntu-22.04']  # 'macos-11', 'macos-12'
        python-version: ['3.7', '3.8', '3.9', '3.10', '3.11-dev']
        cratedb-version: ['nightly']
        sqla-version: ['latest']
      fail-fast: false
    env:
      CRATEDB_VERSION: ${{ matrix.cratedb-version }}
      SQLALCHEMY_VERSION: ${{ matrix.sqla-version }}

    steps:
      - uses: actions/checkout@v3
      - name: Set up Python ${{ matrix.python-version }}
        uses: actions/setup-python@v4
        with:
          python-version: ${{ matrix.python-version }}
          cache: 'pip'
          cache-dependency-path: 'setup.py'

      - name: Invoke tests
        run: |

          # Propagate build matrix information.
          ./devtools/setup_ci.sh

          # Bootstrap environment.
          source bootstrap.sh

          # Invoke validation tasks.
          flake8 src bin
          coverage run bin/test -vv1

Disable "Nightly" testing on macOS
CI: Disable "Nightly" testing on macOS

CrateDB does not produce nightly tarballs for macOS.
