Skip to content

Latest commit

 

History

History
63 lines (46 loc) · 1.52 KB

README.md

File metadata and controls

63 lines (46 loc) · 1.52 KB

sync-and-cache

Sync and cache test resources. This action will sync test resources from different sources (e.g. S3) and cache them for later use. The cache key is based on the hash of the test resources. For this action to work, the Viash project config should contain a list of test resources to sync.

Supported storage types:

  • s3: Syncs resources from an S3 bucket.
  • Create a GitHub issue if you need support for other storage types.

Example:

info:
  test_resources:
    - type: s3
      path: s3://my-bucket/my-folder
      dest: my-folder

Inputs

  • project_directory: - optional. Path to the project directory. This is the directory where the project config _viash.yaml is located.
  • cache_key_prefix: - optional. A prefix for the cache hash key. Prefix is also used for restoring stale cache if no cache hit occurred for key.

Outputs

  • cache_key: Caching key to use to restore the cache. If no test resources are detected, this will be an empty string.
  • dest_paths: Paths to the synced resources. If no test resources are detected, this will be an empty string.

Examples

name: Demo of sync-and-cache

on:
  push:
  pull_request:

jobs:
  demo:
    runs-on: ubuntu-latest
    steps:
      - name: Check out repository
        uses: actions/checkout@v3

      - name: Sync and cache test resources specified by the project config
        uses: viash-io/viash-actions/sync-and-cache