Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

workflows/scheduled: improve coverage of scheduled online checks #192485

Merged
merged 2 commits into from
Oct 2, 2024

Conversation

carlocab
Copy link
Member

@carlocab carlocab commented Oct 1, 2024

Let's test our formulae more systematically. We do this by
indexing all formulae so that:

  • formulae 1 to 50 are tested on the first day of the year
  • formulae 51 to 100 are tested on the second day of the year
  • formulae 101 to 150 are tested on the third day of the year
  • and so on.

This works fine as long as we have fewer than 365 * TEST_COUNT formulae
(currently 18250).

While we're here:

  • scope token permissions more tightly
  • remove the os key from the matrix, since there is only one entry
  • remove unused references to macos-latest
  • always run the formula source test as long as the upstream repository
    has not been archived
  • remove the unnecessary ${{ }} in if: properties

@carlocab carlocab requested review from MikeMcQuaid and a team as code owners October 1, 2024 11:36
@github-actions github-actions bot added workflows PR modifies GitHub Actions workflow files automerge-skip `brew pr-automerge` will skip this pull request labels Oct 1, 2024
Copy link
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

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

Makes sense, a few suggestions!

.github/workflows/scheduled.yml Show resolved Hide resolved
.github/workflows/scheduled.yml Outdated Show resolved Hide resolved
Let's test our formulae more systematically. We do this by
indexing all formulae so that:
- formulae 1 to 50 are tested on the first day of the year
- formulae 51 to 100 are tested on the second day of the year
- formulae 101 to 150 are tested on the third day of the year
- and so on.

This works fine as long as we have fewer than 365 * TEST_COUNT formulae
(currently 18250).

While we're here:
- scope token permissions more tightly
- remove the `os` key from the matrix, since there is only one entry
- remove unused references to `macos-latest`
- always run the formula source test as long as the upstream repository
  has not been archived
- remove the unnecessary `${{  }}` in `if:` properties
- error out with a comment posted if `create_matrix` fails
This way we don't test all the various `postgresql@*` formulae on the
same day.
@carlocab carlocab added ready to merge PR can be merged once CI is green CI-syntax-only Change only affects brew syntax, not the install. Only run syntax CI. labels Oct 2, 2024
Copy link
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

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

Looks great, thanks @carlocab!

@carlocab carlocab added this pull request to the merge queue Oct 2, 2024
Merged via the queue into master with commit 741b0b6 Oct 2, 2024
20 checks passed
@carlocab carlocab deleted the systematic-schedule branch October 2, 2024 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge-skip `brew pr-automerge` will skip this pull request CI-syntax-only Change only affects brew syntax, not the install. Only run syntax CI. ready to merge PR can be merged once CI is green workflows PR modifies GitHub Actions workflow files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants