Skip to content

Flat YAML acceptance tests #162

Flat YAML acceptance tests

Flat YAML acceptance tests #162

Workflow file for this run

name: acceptance-test
on:
pull_request:
push:
branches:
- main
permissions:
contents: read
pull-requests: write
jobs:
test:
runs-on: ubuntu-latest
steps:
# Need to checkout for testing the Action in this repo
- uses: actions/checkout@v4
# creates invalid files that are excluded by git and should not fail
- name: invalid file creation
run: |
mkdir -p tmp/
echo "invalid: yaml" > tmp/invalid.yaml
echo "invalid: json" > tmp/invalid.json
# creates a valid file that should not fail
- name: valid file creation
run: echo "{}" > valid.yaml
- name: acceptance test
uses: ./
id: json-yaml-validate
with:
comment: "true"
exclude_file: .github/config/exclude.txt
- name: acceptance test - files input option (glob)
uses: ./
id: json-yaml-validate-glob-test
with:
comment: "true"
yaml_as_json: "false"
exclude_file: .github/config/exclude-alt.txt
files: |
__tests__/**/test1.yml
__tests__/**/test*.json
- name: acceptance test - flat yaml
uses: ./
id: json-yaml-validate-flat-yaml-test
with:
comment: "true"
yaml_schema: ./__tests__/fixtures/schemas/flat.yaml
files: |
__tests__/acceptance/flat_yaml/flat.yaml