Is it possible to have a Travis job calculate some metric (such as the number of npm audit problems, number of failed tests, number of lint warnings etc) and fail the job if the value is worse than for the previous build (possibly for the previous build on the same branch)? If so, how could the previous value be stored?
I've thought of a ugly interesting workaround: storing the metric value as a tag or a note on the git branch, which the job may pick up, but this really abuses git.
So: Is there a "proper" way of storing data from a Travis build so that other builds may then read it?
In case anyone's curious, the problem I'm having is that my yarn audit condition (no high severity vulnerabilities: yarn audit --groups dependencies || (mask=$? && [ $mask -lt 8 ])) fails without any way to proceed when there's a new CVE which hasn't been addressed yet, so I need a way to proceed with my jobs in such scenarios. In lieu of interactive jobs where you could respond to a "Deploy anyway?" prompt, I thought one way could be to simply re-trigger the same job and let it pass if previousAuditErrors and auditErrors are both 1, i.e., there are no degrades. There may be a better solution for this problem that I didn't think of, but I think the question above is interesting regardless.