From 25786245559a98a6f84d1a970b1264a89792a691 Mon Sep 17 00:00:00 2001 From: Hiro Asari Date: Tue, 28 Jan 2020 15:49:54 -0500 Subject: [PATCH] Add `shards` key for Crystal --- lib/travis/yml/schema/def/cache.rb | 2 +- schema.json | 6 +++++- spec/travis/yml/schema/def/cache_spec.rb | 4 ++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/travis/yml/schema/def/cache.rb b/lib/travis/yml/schema/def/cache.rb index c5971b252..52d254c42 100644 --- a/lib/travis/yml/schema/def/cache.rb +++ b/lib/travis/yml/schema/def/cache.rb @@ -8,7 +8,7 @@ module Def class Cache < Type::Any register :cache - TYPES = %i(apt bundler cargo ccache cocoapods npm packages pip yarn) + TYPES = %i(apt bundler cargo ccache cocoapods npm packages pip shards yarn) def define summary 'Cache settings to speed up the build' diff --git a/schema.json b/schema.json index a0f093cba..78948d5d7 100644 --- a/schema.json +++ b/schema.json @@ -310,7 +310,7 @@ "cache": { "$id": "cache", "title": "Cache", - "description": "Activates caching content that does not often change in order to speed up the build process.\n\nThere are built-in caching strategies for `apt`, `bundler`, `cargo`, `ccache`, `cocoapods`, `npm`, `packages`, `pip`, `yarn`.\nFor other scenarios the generic `directory` option can be used.", + "description": "Activates caching content that does not often change in order to speed up the build process.\n\nThere are built-in caching strategies for `apt`, `bundler`, `cargo`, `ccache`, `cocoapods`, `npm`, `packages`, `pip`, `shards`, `yarn`.\nFor other scenarios the generic `directory` option can be used.", "anyOf": [ { "type": "object", @@ -352,6 +352,10 @@ "type": "boolean", "summary": "Use the pip caching strategy" }, + "shards": { + "type": "boolean", + "summary": "Use the shards caching strategy" + }, "yarn": { "type": "boolean", "summary": "Use the yarn caching strategy" diff --git a/spec/travis/yml/schema/def/cache_spec.rb b/spec/travis/yml/schema/def/cache_spec.rb index 052d2caba..0358d5bf1 100644 --- a/spec/travis/yml/schema/def/cache_spec.rb +++ b/spec/travis/yml/schema/def/cache_spec.rb @@ -46,6 +46,10 @@ type: :boolean, summary: instance_of(String), }, + shards: { + type: :boolean, + summary: instance_of(String), + }, yarn: { type: :boolean, summary: instance_of(String),