As an alternative answer, you can also generate a report file in your test stage and COPY that file to the final stage. That way the final stage will depend on your test stage and BuildKit will have to run it.
COPY