Skip to content

humctl score validate and humctl resources test-definition #5

humctl score validate and humctl resources test-definition

humctl score validate and humctl resources test-definition #5

Workflow file for this run

name: ci
permissions:
contents: read
id-token: write
on:
pull_request:
jobs:
score-validate:
runs-on: ubuntu-24.04
env:
HUMCTL_VERSION: '*'
steps:
- name: checkout code
uses: actions/checkout@v4
- name: install humctl
uses: humanitec/setup-cli-action@v1
with:
version: ${{ env.HUMCTL_VERSION }}
- name: humctl score validate
run: |
scoreFiles=$(ls -d score/*/score.yaml)
for scoreFile in ${scoreFiles}
do
humctl score validate ${scoreFile} \
--strict \
--local
done
- name: test-definition
run: |
resourceDefinitions=$(ls -d resource-definitions/echo-driver/*/*.yaml)
for resourceDefinition in ${resourceDefinitions}
do
humctl resources test-definition ${resourceDefinition} --generate > $(echo ${resourceDefinition} | sed "s,/,-,g")
humctl resources test-definition ${resourceDefinition} --inputs $(echo ${resourceDefinition} | sed "s,/,-,g")
done
resourceDefinitions=$(ls -d resource-definitions/template-driver/*/*.yaml)
for resourceDefinition in ${resourceDefinitions}
do
humctl resources test-definition ${resourceDefinition} --generate > $(echo ${resourceDefinition} | sed "s,/,-,g")
humctl resources test-definition ${resourceDefinition} --inputs $(echo ${resourceDefinition} | sed "s,/,-,g")
done