RFC: Add CI Check in Pull Requests to Run the Unit Tests #1014
Replies: 1 comment 2 replies
-
Thanks for formalizing the proposal, it is something we have thought about for a long time! Indeed we have a bunch of unit tests scattered throughout that we want to unify (#652). During our release process, we run 2 sets of integration tests:
However, these tests depends on API calls & it will be costly to run CI on all PRs + all providers. Additionally, GPU instances is needed to setup CI tests on providers like vLLM, which we have not done yet. I think we should decide first on which sets of tests to run on PRs (lightweight) and which sets of tests (more heavyweight) to run before release. E.g. cc @ashwinb for thoughts. |
Beta Was this translation helpful? Give feedback.
-
Problem Statement / Motivation
This repository has a handful of unit tests scattered throughout. Here are a few examples, but by no means an exhaustive list:
However, when a contributor creates a pull request, there is no CI check or workflow that runs the existing unit tests against the PR's proposed code changes. This means PR code is not validated on the unit test level before being merged unless the reviewer pulls the PR author's code and runs the unit tests manually.
Proposed Solution
Add a CI check or workflow that automatically executes the unit tests for each pull request that contains code changes. (In other words, there is no need to run all the unit tests against documentation, like READMEs.) Since unit tests already exist in the repository, those can be leveraged.
Benefits & Value
If the unit tests are required to pass before each PR is merged, then the likelihood of code breakage will lessen over time. Of course, functional tests, E2E tests, etc. would very likely be beneficial too, but this particular discussion strictly focuses on unit testing because the unit test exist right now in the repository
High-Level Functional & Technical Requirements
Additional Notes
If the existing unit tests do not pass, they should ultimately be fixed so that they do pass, but I do not believe that failing unit tests are a blocker for this particular enhancement. If one or more unit tests are presently failing, they should be omitted (skipped / commented) for now, and an issue can be filed later on to fix the broken unit tests. (And I'd be more than willing to help with this.)
Beta Was this translation helpful? Give feedback.
All reactions