zot icon indicating copy to clipboard operation
zot copied to clipboard

ci/cd: test only affected changes

Open rchincha opened this issue 2 years ago • 1 comments

Is your feature request related to a problem? Please describe.

Our ci/cd pipeline is taking 30-40 mins to complete.

Describe the solution you'd like

We want to achieve something similar to: https://pypi.org/project/pytest-testmon/

We should be able to achieve this with golang tags.

Also this: https://onsi.github.io/ginkgo/#focused-specs. But this means refactor goconvey to ginkgo.

rchincha avatar May 25 '22 19:05 rchincha

If tests results would have been cached, then we could have easily leveraged the go caching mechanism to get rid of duplicate tests executions. Unfortunately the tests in our Makefile "test" target use the following flags: "failfast" and "coverprofile", which disable caching.

  • caching for failfast was added in 1.18, which we aren't yet using https://github.com/golang/go/blob/dcdb19874ff3699e60e41e6b74757b37c4d99b0f/src/cmd/go/internal/test/test.go#L1517
  • caching for coverprofile is a long awaited feature which was promised back in go 1.11 and somehow still got overlooked. Maybe 1.19 will include it. https://go-review.googlesource.com/c/go/+/376134/

Otherwise, I don't see any elegant solution to this issue.

alexstan12 avatar May 31 '22 14:05 alexstan12

CI has been improved by reorganizing the makefile and jobs, let's close this for now.

andaaron avatar Feb 15 '24 10:02 andaaron