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:
-
Frontend checks now only run on changed files.
-
The pre-push hook now runs backend unit tests.
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:
-
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.
-
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