Developer Experience Changes (Pre-Push Hook/Backend and Frontend Tests)

13 views
Skip to first unread message

Justin Nguyen

unread,
Aug 2, 2024, 6:53:20 PM8/2/24
to oppi...@googlegroups.com
Hi Oppia developers,

We have recently implemented a new pre-push hook which should alleviate some of the troubles that you might have had in the past with the pre-push hook taking too long. Below are some of the changes that we have made:

  1. Frontend checks now only run on changed files.
  2. The pre-push hook now runs backend unit tests.

We would appreciate your feedback on this feature. If you have time, please fill out the form here: https://forms.gle/zUyuxHk6uv8m64Rv6.

Alongside this there were some changes in the frontend tests and backend tests scripts (scripts.run_frontend_tests and scripts.run_backend_tests, or make run_tests.frontend or make run_tests.backend). The following changes were made:

  1. The frontend tests script has two new flags, –run_on_changed_files_in_branch will run all frontend tests for changed frontend files in the current branch (including staged/pending changes). The flag, –spces_to_run was also added which allows you to pass in specific frontend spec files to run.
  2. The backend tests script has a change in a flag and also a new flag. (IMPORTANT): The flag –test_target has been renamed to –test_targets and it allows you to run multiple backend tests at once. There is also a new flag called –run_on_changed_files_in_branch and similarly will run all backend tests for changed backend files in the current branch (including staged/pending changes).

Thanks,
Justin

Reply all
Reply to author
Forward
0 new messages