ci: cache pytype-related files between runs draft
authorAnton Shestakov <av6@dwimlabs.net>
Wed, 22 Jan 2020 21:41:25 +0700
changeset 5244 670e1c2b6844
parent 5079 1f92a6aa40d6
ci: cache pytype-related files between runs
.gitlab-ci.yml
--- a/.gitlab-ci.yml	Mon Nov 04 01:30:50 2019 +0530
+++ b/.gitlab-ci.yml	Wed Jan 22 21:41:25 2020 +0700
@@ -6,11 +6,20 @@
 pytype:
     image: octobus/ci-py3-hgext3rd
     script:
+        - ls -la .pytype || true
+        - find .pytype -type f | wc -l || true
         - hg pull -R /ci/repos/mercurial/
         - hg_rev=$(tests/testlib/map-hg-rev.sh "$(hg log -r . -T '{branch}')")
         - hg -R /ci/repos/mercurial/ update "$hg_rev"
+        - find .pytype -type f -exec touch '{}' \; || true
         - jobs=$(python -c 'import multiprocessing; print multiprocessing.cpu_count()')
         - pytype -P /ci/repos/mercurial/:hgext3rd -k hgext3rd -x hgext3rd/evolve/thirdparty -j $jobs || true
+        - ls -la .pytype || true
+        - find .pytype -type f | wc -l || true
+    cache:
+        key: "$CI_COMMIT_REF_SLUG"
+        paths:
+            - .pytype/
     when: manual
 
 tests-py2-cext: