You could use a merge queue, that does an rebase on latest master, then tests your code and merges.