name: Weekly cron

on:
  schedule:
    # run every Monday at 6am UTC
    - cron: '0 6 * * 1'

jobs:
  tests:
    name: ${{ matrix.name }}
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        include:

          - name: Documentation link check
            os: ubuntu-latest
            python: 3.7
            toxenv: linkcheck

          # TODO: Bump Python when 3.10a is out.
          # Test against Python dev in cron job.
          - name: Python dev with basic dependencies
            os: ubuntu-latest
            python: 3.9-dev
            toxenv: pydev-test

    steps:
    - name: Checkout code
      uses: actions/checkout@v2
      with:
        fetch-depth: 0
    - name: Set up Python
      uses: actions/setup-python@v2
      with:
        python-version: ${{ matrix.python }}
    - name: Install language-pack-de and tzdata
      if: ${{ matrix.os == 'ubuntu-latest' }}
      run: sudo apt-get install language-pack-de tzdata
    - name: Install graphviz
      if: ${{ matrix.toxenv == 'linkcheck' }}
      run: sudo apt-get install graphviz
    - name: Install Python dependencies
      run: python -m pip install --upgrade tox codecov
    - name: Run tests
      run: tox ${{ matrix.toxargs}} -e ${{ matrix.toxenv}} -- ${{ matrix.toxposargs}}

name: Weekly cron

on:
  schedule:
    # run every Monday at 6am UTC
    - cron: '0 6 * * 1'

jobs:
  tests:
    name: ${{ matrix.name }}
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        include:

          - name: Documentation link check
            os: ubuntu-latest
            python: 3.7
            toxenv: linkcheck

          # TODO: Uncomment when 3.10 is more mature. Should we use devdeps?
          # Test against Python dev in cron job.
          #- name: Python dev with basic dependencies
          #  os: ubuntu-latest
          #  python: 3.10-dev
          #  toxenv: pydev-test

    steps:
    - name: Checkout code
      uses: actions/checkout@v2
      with:
        fetch-depth: 0
    - name: Set up Python
      uses: actions/setup-python@v2
      with:
        python-version: ${{ matrix.python }}
    - name: Install language-pack-de and tzdata
      if: ${{ matrix.os == 'ubuntu-latest' }}
      run: sudo apt-get install language-pack-de tzdata
    - name: Install graphviz
      if: ${{ matrix.toxenv == 'linkcheck' }}
      run: sudo apt-get install graphviz
    - name: Install Python dependencies
      run: python -m pip install --upgrade tox codecov
    - name: Run tests
      run: tox ${{ matrix.toxargs}} -e ${{ matrix.toxenv}} -- ${{ matrix.toxposargs}}

Comment out Python dev job
TST: Comment out Python dev job [ci skip]
