Skip to content

ci: Consolidate tests#27

Merged
terrykong merged 42 commits intomainfrom
consolidate-tests
Apr 2, 2025
Merged

ci: Consolidate tests#27
terrykong merged 42 commits intomainfrom
consolidate-tests

Conversation

@chtruong814
Copy link
Copy Markdown
Contributor

@chtruong814 chtruong814 commented Mar 21, 2025

What does this PR do ?

Runs tests in the same job to minimize the overall workflow time

  • Refactors the Dockerfile to use a multi-stage build with one stage installing dependencies into the venv and copying that over in the last stage. Not sure why we had a final FROM base step. But due to that, the docker image won't have any of the dependencies and so the tests will reinstall them
  • Run tests with --no-sync so that they do not attempt to reinstall dependencies
  • Moves unit, doc test, and functional tests to a single job to avoid start up time
  • Do not bother mounting repo code back into the container. Container should have all the code and dependencies needed for testing
  • Fix some lint errors that were checked into main. After we get the tests working again, we'll want to strictly set that the lint and tests are required to merge.

Something on main seems to have broken the unit tests. So I defined the test script to always exist 0 to see what all the errors were. We'll want to fix those on this branch or at least before we merge this PR.

The functional tests seem to be taking too long. I set the overall tests timeout for this job to 15 minutes, and it could not complete with the functional tests. Was that expected at this stage? Perhaps we can just completely comment them out.

Issues

List issues that this PR closes (syntax):

Usage

  • You can potentially add a usage example below
# Add a code snippet demonstrating how to use this 

Before your PR is "Ready for review"

Pre checks:

  • Make sure you read and followed Contributor guidelines
  • Did you write any new necessary tests?
  • Did you run the unit tests and functional tests locally? Visit our Testing Guide for how to run tests
  • Did you add or update any necessary documentation? Visit our Document Development Guide for how to write, build and test the docs.

Additional Information

  • ...

@github-actions github-actions Bot added the CI Relating to CI label Mar 21, 2025
@chtruong814 chtruong814 added Run CICD and removed CI Relating to CI labels Mar 21, 2025
@chtruong814 chtruong814 changed the title Consolidate tests ci: Consolidate tests Mar 21, 2025
@github-actions github-actions Bot added the CI Relating to CI label Mar 21, 2025
Signed-off-by: Charlie Truong <chtruong@nvidia.com>
Signed-off-by: Charlie Truong <chtruong@nvidia.com>
Signed-off-by: Charlie Truong <chtruong@nvidia.com>
Signed-off-by: Charlie Truong <chtruong@nvidia.com>
Signed-off-by: Charlie Truong <chtruong@nvidia.com>
Signed-off-by: Charlie Truong <chtruong@nvidia.com>
Signed-off-by: Charlie Truong <chtruong@nvidia.com>
Signed-off-by: Charlie Truong <chtruong@nvidia.com>
Signed-off-by: Charlie Truong <chtruong@nvidia.com>
Signed-off-by: Charlie Truong <chtruong@nvidia.com>
@github-actions github-actions Bot added the Documentation Improvements or additions to documentation label Apr 2, 2025
@chtruong814
Copy link
Copy Markdown
Contributor Author

@terrykong I updated based on your feedback. Please take another look. After merging, I assume we'll want to change the required check to the CI quality check step instead.

terrykong
terrykong previously approved these changes Apr 2, 2025
Copy link
Copy Markdown
Collaborator

@terrykong terrykong left a comment

Choose a reason for hiding this comment

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

approved modulo that FIXME comment

Comment thread .github/workflows/cicd-main.yml Outdated
@terrykong
Copy link
Copy Markdown
Collaborator

also a reminder that we need to change the status check to that QA one after this goes in

Signed-off-by: Charlie Truong <chtruong@nvidia.com>
Signed-off-by: Charlie Truong <chtruong@nvidia.com>
Signed-off-by: Charlie Truong <chtruong@nvidia.com>
Signed-off-by: Charlie Truong <chtruong@nvidia.com>
Signed-off-by: Charlie Truong <chtruong@nvidia.com>
Signed-off-by: Charlie Truong <chtruong@nvidia.com>
Signed-off-by: Charlie Truong <chtruong@nvidia.com>
Signed-off-by: Charlie Truong <chtruong@nvidia.com>
Signed-off-by: Charlie Truong <chtruong@nvidia.com>
Signed-off-by: Charlie Truong <chtruong@nvidia.com>
@terrykong
Copy link
Copy Markdown
Collaborator

for posterity of those stumbling on this PR, this change helps our CI run a little faster since spin-up and spin-down of containers is slow on CI infra (like 3 min per test that needs docker images)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI Relating to CI Documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants