Skip to content

Cadence Cookbook Updates - Functional MVP #2

Cadence Cookbook Updates - Functional MVP

Cadence Cookbook Updates - Functional MVP #2

Workflow file for this run

name: Run Cadence tests
on: pull_request
jobs:
get-recipe-repos:
runs-on: macos-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Dynamically retrieve matrix
id: set-matrix
run: echo "::set-output name=matrix::$(ls src/data/recipes/*: | jq -R -s -c 'split("\n")[:-1]' )"

Check failure on line 14 in .github/workflows/cadence.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/cadence.yml

Invalid workflow file

You have an error in your yaml syntax on line 14
run-cadence-tests:
needs: get-recipe-repos
runs-on: macos-latest
strategy:
matrix:
recipe: ${{ fromJson(needs.get-recipe-repos.outputs.matrix) }}
steps:
- name: Set env
env:
RECIPE_REPO: "${{ matrix.recipe }}"
run: |
RECIPE_REPO=${{ env.RECIPE_REPO }}
RECIPE_REPO=${RECIPE_REPO//:} # replace all colons
echo RECIPE_REPO=${RECIPE_REPO} >> $GITHUB_ENV # update GitHub ENV vars
- name: print env
run: echo ${{ env.RECIPE_REPO }}
- name: Check out repository code
uses: actions/checkout@v4
with:
submodules: 'true'
- name: Install Flow CLI
run: |
if test -f ${{ env.RECIPE_REPO }}/cadence/tests.cdc; then
brew update
brew install flow-cli
flow init
fi
- name: Trigger recipe test
run: |
if test -f ${{ env.RECIPE_REPO }}/cadence/tests.cdc; then
flow test ${{ env.RECIPE_REPO }}/cadence/tests.cdc
fi