-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: add build and test cache into github actions cache #1739
ci: add build and test cache into github actions cache #1739
Conversation
3ce96ae
to
d7de716
Compare
Linter goes faster than tests, remove the linter cache so the CI is efficient and cache less poluted. Fix makefile target with auto verbose tag.
8cc48bc
to
623a995
Compare
623a995
to
5aa193e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to fix the CI to generate coverprofile
on tagged
commits and main
branch/ release.
Caches currently takes up 4.5 GB instead of 3.9GB which is not bad result as it is approximatelly ~600MB
per ~/.cache/go-build
for each platform. So ~1.8GB was approximate increase in general and ends up only increased by ~600MB
.
The workflow takes up to ~11-12 minutes
when no code change is made, the caching looks currently alright and hit ratio works.
e61335a
to
1751d01
Compare
ba19752
to
1693148
Compare
cb68d0a
to
f882f85
Compare
804e077
to
8385b95
Compare
move installation of Go before `go mod download`. move installation of tools and modules into `go-tools-cache`.
8385b95
to
5ff3213
Compare
…he miss fix: touch takes different format in MacOS than Unix. fix path to work also on Windows
reduces time to install tools on windows.
5ff3213
to
6a237bf
Compare
Apps Proxy Kubernetes Diff [CI]Between Expand--- /tmp/artifacts/test-k8s-state.old.json.processed.kv 2024-05-07 12:01:30.822030694 +0000
+++ /tmp/artifacts/test-k8s-state.new.json.processed.kv 2024-05-07 12:01:30.946030185 +0000
@@ -105 +105 @@
-<Deployment/apps-proxy>.spec.template.spec.containers[0].image = "docker.io/keboola/apps-proxy:e967004";
+<Deployment/apps-proxy>.spec.template.spec.containers[0].image = "docker.io/keboola/apps-proxy:6a237bf";
@@ -461,3 +461,3 @@
-<Pod/apps-proxy-<hash>>.spec.containers[0].image = "docker.io/keboola/apps-proxy:e967004";
-<Pod/apps-proxy-<hash>>.spec.containers[0].image = "docker.io/keboola/apps-proxy:e967004";
-<Pod/apps-proxy-<hash>>.spec.containers[0].image = "docker.io/keboola/apps-proxy:e967004";
+<Pod/apps-proxy-<hash>>.spec.containers[0].image = "docker.io/keboola/apps-proxy:6a237bf";
+<Pod/apps-proxy-<hash>>.spec.containers[0].image = "docker.io/keboola/apps-proxy:6a237bf";
+<Pod/apps-proxy-<hash>>.spec.containers[0].image = "docker.io/keboola/apps-proxy:6a237bf";
@@ -879 +879 @@
-<ReplicaSet/apps-proxy-<hash>>.spec.template.spec.containers[0].image = "docker.io/keboola/apps-proxy:e967004";
+<ReplicaSet/apps-proxy-<hash>>.spec.template.spec.containers[0].image = "docker.io/keboola/apps-proxy:6a237bf";
(see artifacts in the Github Action for more information) |
Templates API Kubernetes Diff [CI]Between Expand--- /tmp/artifacts/test-k8s-state.old.json.processed.kv 2024-05-07 12:03:10.821410702 +0000
+++ /tmp/artifacts/test-k8s-state.new.json.processed.kv 2024-05-07 12:03:11.025411248 +0000
@@ -194 +194 @@
-<Deployment/templates-api>.spec.template.spec.containers[0].image = "docker.io/keboola/templates-api:e967004";
+<Deployment/templates-api>.spec.template.spec.containers[0].image = "docker.io/keboola/templates-api:6a237bf";
@@ -747,3 +747,3 @@
-<Pod/templates-api-<hash>>.spec.containers[0].image = "docker.io/keboola/templates-api:e967004";
-<Pod/templates-api-<hash>>.spec.containers[0].image = "docker.io/keboola/templates-api:e967004";
-<Pod/templates-api-<hash>>.spec.containers[0].image = "docker.io/keboola/templates-api:e967004";
+<Pod/templates-api-<hash>>.spec.containers[0].image = "docker.io/keboola/templates-api:6a237bf";
+<Pod/templates-api-<hash>>.spec.containers[0].image = "docker.io/keboola/templates-api:6a237bf";
+<Pod/templates-api-<hash>>.spec.containers[0].image = "docker.io/keboola/templates-api:6a237bf";
@@ -1406 +1406 @@
-<ReplicaSet/templates-api-<hash>>.spec.template.spec.containers[0].image = "docker.io/keboola/templates-api:e967004";
+<ReplicaSet/templates-api-<hash>>.spec.template.spec.containers[0].image = "docker.io/keboola/templates-api:6a237bf";
@@ -1477,0 +1478,12 @@
+<Secret/sh.helm.release.v1.templates-api-etcd.v2> = {};
+<Secret/sh.helm.release.v1.templates-api-etcd.v2>.apiVersion = "v1";
+<Secret/sh.helm.release.v1.templates-api-etcd.v2>.data = {};
+<Secret/sh.helm.release.v1.templates-api-etcd.v2>.kind = "Secret";
+<Secret/sh.helm.release.v1.templates-api-etcd.v2>.metadata = {};
+<Secret/sh.helm.release.v1.templates-api-etcd.v2>.metadata.labels = {};
+<Secret/sh.helm.release.v1.templates-api-etcd.v2>.metadata.labels.name = "templates-api-etcd";
+<Secret/sh.helm.release.v1.templates-api-etcd.v2>.metadata.labels.owner = "helm";
+<Secret/sh.helm.release.v1.templates-api-etcd.v2>.metadata.labels.version = "2";
+<Secret/sh.helm.release.v1.templates-api-etcd.v2>.metadata.name = "sh.helm.release.v1.templates-api-etcd.v2";
+<Secret/sh.helm.release.v1.templates-api-etcd.v2>.metadata.namespace = "templates-api";
+<Secret/sh.helm.release.v1.templates-api-etcd.v2>.type = "helm.sh/release.v1";
(see artifacts in the Github Action for more information) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏 Let's try it.
Jira: PSGO-561
Changes:
git clone
pulls the files and changes mod time to current time. cmd/go: test cache hash inputs include ModTime, often causing cache misses on CI golang/go#58571-coverprofile
flag that prevents caching of tests.-coverprofile
flag for release pipeline. Tagged commits andmain
.go tools
cache to reduce size of cache per step.e2e
tests is already injected but not evaluated. Will be done in next PR.go mod download
step to cache also packages in tools cache.