diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 68faf5c..143b9a4 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -9,6 +9,10 @@ on: push: branches: ['work/**'] workflow_dispatch: + # Daily against python-multiplatform develop as it is that day: the binder's contract moves under + # this package without a pull request here, and #41 found out only at the next PR. + schedule: + - cron: '17 3 * * *' permissions: contents: read @@ -60,3 +64,27 @@ jobs: - run: pip install pytest mypy setuptools wheel - name: Run the suite run: python -m pytest tests -q -rs + + # A failed daily run opens one issue (or comments on the open one) so a binder change that breaks + # this package is seen without anyone watching the Actions tab. + report-scheduled-failure: + needs: [no-binder, with-binder] + if: failure() && github.event_name == 'schedule' + runs-on: ubuntu-latest + permissions: + issues: write + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_REPO: ${{ github.repository }} + RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} + steps: + - name: Open or update the tracking issue + run: | + title="Daily tests fail against python-multiplatform develop" + number=$(gh issue list --state open --search "in:title \"$title\"" --json number --jq '.[0].number') + body="The scheduled run failed: $RUN_URL" + if [ -n "$number" ]; then + gh issue comment "$number" --body "$body" + else + gh issue create --title "$title" --body "$body" + fi diff --git a/AGENTS.md b/AGENTS.md index 36e2223..99af3df 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -194,6 +194,8 @@ worktree so a test can see it. Read it in place. - The suite runs on GitHub Actions (`.github/workflows/tests.yml`) in both environments, without and with a python-multiplatform checkout, for every pull request into `develop`. Local runs are for quick checks of the part you changed; leave the full two-environment run to CI. + It also runs daily against python-multiplatform `develop` as it is that day; a failed daily run + opens (or comments on) one tracking issue. - `PythonMultiplatform` is read-only from this repository. Never write to it from here. - Record the before and after counts of every change; a change that only touches documentation must leave them identical.