ansible-collections / community.kubernetes

Kubernetes Collection for Ansible
https://galaxy.ansible.com/community/kubernetes
GNU General Public License v3.0
265 stars 104 forks source link

molecule: clone the chart repos with depth=1 #303

Closed goneri closed 3 years ago

goneri commented 3 years ago

We only need to checkout one specific commit, no need to retrieve the whole repository.

The whole repository is 282.34MiB, with depth=1, we only retrieve 4.74MiB. Since we clone the repositry 3 times, we save =~ 800MiB per run.

$ time git clone http://github.com/helm/charts.git regular
Cloning into 'regular'...
warning: redirecting to https://github.com/helm/charts.git/
remote: Enumerating objects: 9, done.
remote: Counting objects: 100% (9/9), done.
remote: Compressing objects: 100% (9/9), done.
remote: Total 127070 (delta 0), reused 3 (delta 0), pack-reused 127061
Receiving objects: 100% (127070/127070), 282.34 MiB | 49.89 MiB/s, done.
Resolving deltas: 100% (85717/85717), done.

real    0m9.514s
user    0m11.197s
sys     0m1.579s
$ time git clone --depth=1 http://github.com/helm/charts.git depth1
Cloning into 'depth1'...
warning: redirecting to https://github.com/helm/charts.git/
remote: Enumerating objects: 6535, done.
remote: Counting objects: 100% (6535/6535), done.
remote: Compressing objects: 100% (5486/5486), done.
remote: Total 6535 (delta 2261), reused 2377 (delta 866), pack-reused 0
Receiving objects: 100% (6535/6535), 4.74 MiB | 10.17 MiB/s, done.
Resolving deltas: 100% (2261/2261), done.

real    0m2.671s
user    0m0.498s
sys     0m0.207s
codecov[bot] commented 3 years ago

Codecov Report

Merging #303 (d0ed8aa) into main (108efaf) will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #303   +/-   ##
=======================================
  Coverage   37.00%   37.00%           
=======================================
  Files           3        3           
  Lines         727      727           
  Branches      144      144           
=======================================
  Hits          269      269           
  Misses        409      409           
  Partials       49       49           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 108efaf...d0ed8aa. Read the comment docs.