diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 526b465e..07859099 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -20,11 +20,6 @@ jobs: # a pull request then we can checkout the head. fetch-depth: 2 - # If this run was triggered by a pull request event, then checkout - # the head of the pull request instead of the merge commit. - - run: git checkout HEAD^2 - if: ${{ github.event_name == 'pull_request' }} - # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL uses: github/codeql-action/init@v1 diff --git a/tests/test_lqr_speed_steer_control.py b/tests/test_lqr_speed_steer_control.py index 9e921895..cee9759a 100644 --- a/tests/test_lqr_speed_steer_control.py +++ b/tests/test_lqr_speed_steer_control.py @@ -5,3 +5,7 @@ from PathTracking.lqr_speed_steer_control import lqr_speed_steer_control as m def test_1(): m.show_animation = False m.main() + + +if __name__ == '__main__': + conftest.run_this_test(__file__) diff --git a/tests/test_model_predictive_speed_and_steer_control.py b/tests/test_model_predictive_speed_and_steer_control.py index 27b6b79c..9a50e480 100644 --- a/tests/test_model_predictive_speed_and_steer_control.py +++ b/tests/test_model_predictive_speed_and_steer_control.py @@ -12,3 +12,6 @@ if 'cvxpy' in sys.modules: # pragma: no cover def test_2(): m.show_animation = False m.main2() + +if __name__ == '__main__': + conftest.run_this_test(__file__) diff --git a/tests/test_move_to_pose.py b/tests/test_move_to_pose.py index 6a5a4cf4..c6a6b8bc 100644 --- a/tests/test_move_to_pose.py +++ b/tests/test_move_to_pose.py @@ -5,3 +5,7 @@ from PathTracking.move_to_pose import move_to_pose as m def test_1(): m.show_animation = False m.main() + + +if __name__ == '__main__': + conftest.run_this_test(__file__) diff --git a/tests/test_n_joint_arm_to_point_control.py b/tests/test_n_joint_arm_to_point_control.py index a87271b4..1d886d36 100644 --- a/tests/test_n_joint_arm_to_point_control.py +++ b/tests/test_n_joint_arm_to_point_control.py @@ -9,3 +9,7 @@ random.seed(12345) def test1(): m.show_animation = False m.animation() + + +if __name__ == '__main__': + conftest.run_this_test(__file__) diff --git a/tests/test_particle_filter.py b/tests/test_particle_filter.py index dad823ee..13a20f60 100644 --- a/tests/test_particle_filter.py +++ b/tests/test_particle_filter.py @@ -5,3 +5,7 @@ from Localization.particle_filter import particle_filter as m def test_1(): m.show_animation = False m.main() + + +if __name__ == '__main__': + conftest.run_this_test(__file__) diff --git a/tests/test_potential_field_planning.py b/tests/test_potential_field_planning.py index c473a239..ce178d79 100644 --- a/tests/test_potential_field_planning.py +++ b/tests/test_potential_field_planning.py @@ -5,3 +5,7 @@ from PathPlanning.PotentialFieldPlanning import potential_field_planning as m def test1(): m.show_animation = False m.main() + + +if __name__ == '__main__': + conftest.run_this_test(__file__) diff --git a/tests/test_pure_pursuit.py b/tests/test_pure_pursuit.py index 2f0b83ae..0e0b83bf 100644 --- a/tests/test_pure_pursuit.py +++ b/tests/test_pure_pursuit.py @@ -5,3 +5,7 @@ from PathTracking.pure_pursuit import pure_pursuit as m def test1(): m.show_animation = False m.main() + + +if __name__ == '__main__': + conftest.run_this_test(__file__) diff --git a/tests/test_quintic_polynomials_planner.py b/tests/test_quintic_polynomials_planner.py index bee383a7..43f3c6ba 100644 --- a/tests/test_quintic_polynomials_planner.py +++ b/tests/test_quintic_polynomials_planner.py @@ -5,3 +5,7 @@ from PathPlanning.QuinticPolynomialsPlanner import quintic_polynomials_planner a def test1(): m.show_animation = False m.main() + + +if __name__ == '__main__': + conftest.run_this_test(__file__) diff --git a/tests/test_raycasting_grid_map.py b/tests/test_raycasting_grid_map.py index 60ecf769..f08ae927 100644 --- a/tests/test_raycasting_grid_map.py +++ b/tests/test_raycasting_grid_map.py @@ -5,3 +5,7 @@ from Mapping.raycasting_grid_map import raycasting_grid_map as m def test1(): m.show_animation = False m.main() + + +if __name__ == '__main__': + conftest.run_this_test(__file__) diff --git a/tests/test_rectangle_fitting.py b/tests/test_rectangle_fitting.py index 20dc9caf..cb28b603 100644 --- a/tests/test_rectangle_fitting.py +++ b/tests/test_rectangle_fitting.py @@ -5,3 +5,7 @@ from Mapping.rectangle_fitting import rectangle_fitting as m def test1(): m.show_animation = False m.main() + + +if __name__ == '__main__': + conftest.run_this_test(__file__) diff --git a/tests/test_reeds_shepp_path_planning.py b/tests/test_reeds_shepp_path_planning.py index 150f84fb..f1ce82d4 100644 --- a/tests/test_reeds_shepp_path_planning.py +++ b/tests/test_reeds_shepp_path_planning.py @@ -40,3 +40,7 @@ def test2(): check_edge_condition(px, py, pyaw, start_x, start_y, start_yaw, end_x, end_y, end_yaw) + + +if __name__ == '__main__': + conftest.run_this_test(__file__) diff --git a/tests/test_rocket_powered_landing.py b/tests/test_rocket_powered_landing.py index 01d2f4f8..7cf69567 100644 --- a/tests/test_rocket_powered_landing.py +++ b/tests/test_rocket_powered_landing.py @@ -8,3 +8,7 @@ if 'cvxpy' in sys.modules: # pragma: no cover def test1(): m.show_animation = False m.main() + + +if __name__ == '__main__': + conftest.run_this_test(__file__) diff --git a/tests/test_stanley_controller.py b/tests/test_stanley_controller.py index 7920273d..a1d80737 100644 --- a/tests/test_stanley_controller.py +++ b/tests/test_stanley_controller.py @@ -5,3 +5,7 @@ from PathTracking.stanley_controller import stanley_controller as m def test1(): m.show_animation = False m.main() + + +if __name__ == '__main__': + conftest.run_this_test(__file__) diff --git a/tests/test_state_lattice_planner.py b/tests/test_state_lattice_planner.py index 89ee0427..0c14222e 100644 --- a/tests/test_state_lattice_planner.py +++ b/tests/test_state_lattice_planner.py @@ -5,3 +5,7 @@ from PathPlanning.StateLatticePlanner import state_lattice_planner as m def test1(): m.show_animation = False m.main() + + +if __name__ == '__main__': + conftest.run_this_test(__file__) diff --git a/tests/test_two_joint_arm_to_point_control.py b/tests/test_two_joint_arm_to_point_control.py index 24cc26f1..1de4fcd8 100644 --- a/tests/test_two_joint_arm_to_point_control.py +++ b/tests/test_two_joint_arm_to_point_control.py @@ -6,3 +6,7 @@ from ArmNavigation.two_joint_arm_to_point_control \ def test1(): m.show_animation = False m.animation() + + +if __name__ == '__main__': + conftest.run_this_test(__file__) diff --git a/tests/test_unscented_kalman_filter.py b/tests/test_unscented_kalman_filter.py index c4f79e89..b7dda6e2 100644 --- a/tests/test_unscented_kalman_filter.py +++ b/tests/test_unscented_kalman_filter.py @@ -5,3 +5,7 @@ from Localization.unscented_kalman_filter import unscented_kalman_filter as m def test1(): m.show_animation = False m.main() + + +if __name__ == '__main__': + conftest.run_this_test(__file__) diff --git a/tests/test_visibility_road_map_planner.py b/tests/test_visibility_road_map_planner.py index bd758da5..5a663d28 100644 --- a/tests/test_visibility_road_map_planner.py +++ b/tests/test_visibility_road_map_planner.py @@ -5,3 +5,7 @@ from PathPlanning.VoronoiRoadMap import voronoi_road_map as m def test1(): m.show_animation = False m.main() + + +if __name__ == '__main__': + conftest.run_this_test(__file__) diff --git a/tests/test_voronoi_road_map_planner.py b/tests/test_voronoi_road_map_planner.py index 51fe38ea..b0b7550f 100644 --- a/tests/test_voronoi_road_map_planner.py +++ b/tests/test_voronoi_road_map_planner.py @@ -5,3 +5,7 @@ from PathPlanning.VisibilityRoadMap import visibility_road_map as m def test1(): m.show_animation = False m.main() + + +if __name__ == '__main__': + conftest.run_this_test(__file__)