Skip to content

Run unit tests on a schedule#3119

Open
brianaydemir wants to merge 7 commits intoPelicanPlatform:mainfrom
brianaydemir:find-flakey-tests
Open

Run unit tests on a schedule#3119
brianaydemir wants to merge 7 commits intoPelicanPlatform:mainfrom
brianaydemir:find-flakey-tests

Conversation

@brianaydemir
Copy link
Contributor

This new GitHub Actions workflow intends to operate as follows:

  • Run the Linux unit tests once a day.
  • At the end of the run, summarize the test failures found in the current run and the 14 runs prior.

The idea is to make it easier to identify "flakey" unit tests vs. those that are reliably failing. The notification mechanism, or lack thereof, is perhaps not ideal, but at we can start accumulating data.

Screenshot 2026-02-13 at 15 58 34

@brianaydemir brianaydemir added this to the v7.25 milestone Feb 13, 2026
@brianaydemir brianaydemir added test Improvements to the test suite internal Internal code improvements, not user-facing labels Feb 13, 2026
@brianaydemir
Copy link
Contributor Author

I'm open to a better (or different) name for the workflow. At the moment, I've chosen to follow the naming scheme used by the other testing workflows.

@brianaydemir
Copy link
Contributor Author

To test this PR: I switched the default branch for my fork to the branch this PR is based on, and then I manually triggered the workflow 13 times.

Copy link
Collaborator

@turetske turetske left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@brianaydemir Why only linux? Why not MacOS as well? I say this because I know we have had flaky tests that were also platform specific.

copilot bot and others added 6 commits February 26, 2026 17:11
I actually had written everything up to and including the `run-tests`
job when I asked Copilot to work on `analyze-tests`.
- Add `workflow_call` trigger to `test-macos.yml` and
  `test-windows.yml` so they can be used as reusable workflows.

- Add `test-macos-scheduled.yml` and `test-windows-scheduled.yml`,
  which mirror `test-linux-scheduled.yml`: each runs the corresponding
  test workflow on a daily schedule and then analyzes JUnit artifacts
  across the 14 most recent runs to surface flakey tests.

- Extract the inline Python from `test-linux-scheduled.yml` into
  `.github/scripts/analyze_junit_results.py`. The script is
  generalized to strip `-Linux`, `-macOS`, and `-Windows` suffixes
  from matrix variant names, so all three scheduled workflows can share
  it.

- Extract the identical inline shell from the "Download artifacts" step
  in all three scheduled workflows into
  `.github/scripts/download_junit_artifacts.sh`. The script takes the
  workflow name as $1 and relies on standard GitHub Actions environment
  variables (`GITHUB_REPOSITORY`, `GITHUB_RUN_ID`,
  `GITHUB_STEP_SUMMARY`).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- bandit B405/B314: Add `# nosec` with justification comment (XML is
  from our own CI runner, not user input).
- pylint W0718: Narrow broad `Exception` catch to
  `(ET.ParseError, OSError)`.
- mypy var-annotated: Add explicit type annotation for
  `failures_by_matrix`.
- mypy union-attr: Guard against `testcase.get('classname')` returning
  `None` by using `or ""`.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal Internal code improvements, not user-facing test Improvements to the test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Run unit tests on a schedule to identify flakey tests

2 participants