name: Weekly update

on:
  workflow_dispatch:
  schedule:
    - cron: "0 12 * * 0"

jobs:
  basic:
    name: Head on Python 3.13
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v6
        with:
          submodules: true

      # Note: you need to add a git pull here if you are not on a clean checkout, but CI always is
      - name: Update to latest
        run: git submodule foreach "git checkout develop || git checkout master"

      - uses: actions/setup-python@v6
        with:
          python-version: "3.13"

      - name: Build and install wheel
        run: |
          pip install -v . --group test

      - name: Test
        run: python -m pytest
