Bonus actions are still actions, otherwise things like the incapacitated condition would allow for bonus actions too.
This is the last line from the section on bonus actions, "You choose when to take a bonus action during your turn, unless the bonus action’s timing is specified, and anything...