Using build matrix for custom stage

I’d like to use matrix expansion to avoid duplicating scripts for a needed stage. I tried so in: https://travis-ci.org/ampproject/docs/builds/532377988

But somehow the matrix only expands to the Test stage. Is there something I am missing?

As per Trouble with Python build matrix being respected by jobs , stages are not considered an axis so you cannot use the matrix to add jobs to more than one stage.

Maybe you can specify stage at top level to change the name of the default stage.