Skip to content

move test action setup into resuable workflow #1

move test action setup into resuable workflow

move test action setup into resuable workflow #1

Workflow file for this run

name: Reusable setup workflow for actions tests
on:
workflow_call:
inputs:
recipes-version:
required: true
type: string
jobs:
runs-on: ubuntu-latest

Check failure on line 11 in .github/workflows/setup.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/setup.yaml

Invalid workflow file

You have an error in your yaml syntax on line 11
setup:
- name: "Clone test feedstock"
# Fetches test feedstock (containing example test recipes) from pangeo-forge-recipes
run: |
git clone --depth 1 --branch ${{ inputs.recipes-version }} https://github.com/pangeo-forge/pangeo-forge-recipes.git
- name: "Add requirements.txt"
# The clone step above gives us recipe modules and meta.yaml, but does not contain a requirements file,
# so we add that here, providing the action with the correct version of pangeo-forge-recipes to install
# in the container at action runtime.
run: |
echo "pangeo-forge-recipes==${{ inputs.recipes-version }}" > pangeo-forge-recipes/examples/feedstock/requirements.txt
- name: "Overwrite meta.yaml"
# The example feedstock contains multiple recipes, but we just want to test gpcp
run: |
grep -E 'recipes|gpcp' pangeo-forge-recipes/examples/feedstock/meta.yaml > temp.yaml \
&& mv temp.yaml pangeo-forge-recipes/examples/feedstock/meta.yaml