fix: correct typos and update invalid-type error example #205
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Validate tests | |
on: | |
push: | |
branches: [ main ] | |
paths: | |
- grammar/** | |
- test_data/** | |
- functions/** | |
pull_request: | |
branches: [ main ] | |
jobs: | |
# https://code.dblock.org/2021/09/03/generating-task-matrix-by-looping-over-repo-files-with-github-actions.html | |
list-tests: | |
runs-on: ubuntu-latest | |
outputs: | |
matrix: ${{ steps.set-matrix.outputs.matrix }} | |
steps: | |
- uses: actions/checkout@v2 | |
- id: set-matrix | |
run: echo "::set-output name=matrix::$(ls grammar/*.yml | jq -R -s -c 'split("\n")[:-1]')" | |
validate-tests: | |
needs: list-tests | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
manifest: ${{ fromJson(needs.list-tests.outputs.matrix) }} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v3 | |
with: | |
cache: pip | |
cache-dependency-path: .github/workflows/validate_requirements.txt | |
- run: pip install -r .github/workflows/validate_requirements.txt | |
- name: Validate grammar tests | |
run: "check-jsonschema --schemafile grammar_schema.yml ${{ matrix.manifest }}" | |
list-functions: | |
runs-on: ubuntu-latest | |
outputs: | |
matrix: ${{ steps.set-matrix.outputs.matrix }} | |
steps: | |
- uses: actions/checkout@v2 | |
- id: set-matrix | |
run: echo "::set-output name=matrix::$(ls functions/*.yml | jq -R -s -c 'split("\n")[:-1]')" | |
validate-functions: | |
needs: list-functions | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
manifest: ${{ fromJson(needs.list-functions.outputs.matrix) }} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v3 | |
with: | |
cache: pip | |
cache-dependency-path: .github/workflows/validate_requirements.txt | |
- run: pip install -r .github/workflows/validate_requirements.txt | |
- name: Validate function spec | |
run: "check-jsonschema --schemafile function_schema.yml ${{ matrix.manifest }}" |