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

Run examples on change #735

Merged
merged 14 commits into from
May 6, 2024
Merged

Run examples on change #735

merged 14 commits into from
May 6, 2024

Conversation

charlesfrye
Copy link
Collaborator

This PR adds a new workflow, Run, that detects changed examples and runs them. This gets us another step closer to full continuous integration of example changes -- it will reduce the number of issues that show up via monitoring (🎉), but we're still missing isolated builds.

To keep testing fast and isolated, all changed examples are executed in parallel job runs (via a jobs matrix output by the changed-files action).

I also centralized the environment setup for the different CI workflows into a single action file, as in the main repo.

FYI, I would not have been able to get this working without the act tool, which runs GitHub Actions locally. Really speeds up debugging!

Type of Change

  • Other (changes to the codebase, but not to examples)

@charlesfrye
Copy link
Collaborator Author

charlesfrye commented May 5, 2024

Had to revert the updates to typechecking.

mypy<0.981 cannot typecheck any code with positional-only parameters, including modal, due to a bug. In the old way of setting up the type-checking environment, modal was not installed, and so it was not checked.

I tried to update mypy, but versions with the fix are much, much slower. As configured, typechecking was taking about two minutes per example, instead of under a minute total.

So I went back to the old way.

Note that we also can't effectively typecheck any code running inside Modal functions, because the dependencies aren't available to mypy. So we aren't really typechecking much at all here...

@charlesfrye
Copy link
Collaborator Author

merging but still welcome C+C/review to improve!

@charlesfrye charlesfrye merged commit 75d6c99 into main May 6, 2024
6 checks passed
@charlesfrye charlesfrye deleted the charlesfrye/run-in-actions branch May 6, 2024 17:44
@thundergolfer
Copy link
Collaborator

Was halfway through! haha. Almost got there.

Copy link
Collaborator

@thundergolfer thundergolfer left a comment

Choose a reason for hiding this comment

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

LGTM. thanks for wading through all that YAML 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants