From 11fa40252b16bb614aae02fa4a6c1264361249c8 Mon Sep 17 00:00:00 2001 From: Hendrik Cannoodt Date: Wed, 29 May 2024 12:51:44 +0200 Subject: [PATCH] =?UTF-8?q?Add=20`resources=5Ftest`=20field=20in=20the=20p?= =?UTF-8?q?ackage=20config=20that=20can=20be=20picked=20u=E2=80=A6=20(#709?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add `resources_test` field in the package config that can be picked up by the CI * fill in PR number --- CHANGELOG.md | 3 +++ .../scala/io/viash/packageConfig/PackageConfig.scala | 10 ++++++++++ 2 files changed, 13 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 39d08f85d..619bc3bb8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,9 @@ TODO add summary The cache is stored in the `~/.viash/repositories` directory using sparse-checkout to only fetch the necessary files. During a build, the cache is checked for the repository and if it is found and still up-to-date, the repository is not cloned again and instead the cache is copied to a temporary folder where the files are checked out from the sparse-checkout. +* `resources_test`: Add a `resources_test` field to the `_viash.yaml` to specify resources that are needed during testing (PR #709). + Currently it is up to the user or CI to make sure these resources are available in the `resources_test` directory during testing. + ## BUG FIXES `dependencies`: Fix resolving of dependencies of dependencies (PR #701). The stricter build config was now lacking the necessary information to resolve dependencies of dependencies. diff --git a/src/main/scala/io/viash/packageConfig/PackageConfig.scala b/src/main/scala/io/viash/packageConfig/PackageConfig.scala index 26a4fe290..c7b3ddb28 100644 --- a/src/main/scala/io/viash/packageConfig/PackageConfig.scala +++ b/src/main/scala/io/viash/packageConfig/PackageConfig.scala @@ -172,6 +172,16 @@ case class PackageConfig( @default("Empty") @since("Viash 0.9.0") links: Links = Links(), + + @description("The resources that are required for testing.") + @example( + """resources_test: + | - "https://raw.githubusercontent.com/viash-io/viash/main/CHANGELOG.md" + | - "https://www.scala-lang.org/feed/blog.xml" + |""".stripMargin, "yaml") + @default("Empty") + @since("Viash 0.9.0") + resources_test: OneOrMore[String] = Nil, ) object PackageConfig {