]> git.mxchange.org Git - friendica.git/commitdiff
Add cache for PHP 7.4 test
authorPhilipp <admin@philipp.info>
Thu, 27 May 2021 20:11:47 +0000 (22:11 +0200)
committerPhilipp <admin@philipp.info>
Thu, 27 May 2021 20:11:47 +0000 (22:11 +0200)
.drone.yml

index beb39fc52bd0d98c024dde4e9ac0b0e727f3d784..2d24069296a09f395b4cf1dedca93e3be232cd91 100644 (file)
@@ -141,11 +141,36 @@ type: docker
 name: php7.4-mariadb
 
 steps:
+  - name: Restore cache
+    image: meltwater/drone-cache:dev
+    settings:
+      backend: "filesystem"
+      restore: true
+      cache_key: '{{ .Repo.Name }}_php74_{{ arch }}_{{ os }}'
+      archive_format: "gzip"
+      mount:
+        - '.composer'
+    volumes:
+      - name: cache
+        path: /tmp/cache
   - name: Composer install
     image: friendicaci/php7.4:php7.4.18
     commands:
-      - composer validate
-      - composer install --prefer-dist
+      - export COMPOSER_HOME=.composer
+      - ./bin/composer.phar validate
+      - ./bin/composer.phar install --prefer-dist
+  - name: Rebuild cache
+    image: meltwater/drone-cache:dev
+    settings:
+      backend: "filesystem"
+      rebuild: true
+      cache_key: '{{ .Repo.Name }}_php74_{{ arch }}_{{ os }}'
+      archive_format: "gzip"
+      mount:
+        - '.composer'
+    volumes:
+      - name: cache
+        path: /tmp/cache
   - name: Test Friendica
     image: friendicaci/php7.4:php7.4.18
     environment: