Skip to content

Node Package Updates #155

Node Package Updates

Node Package Updates #155

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 - custom formats
uses: ./
id: json-yaml-validate-custom-formats-test
with:
comment: "true"
json_schema: ./__tests__/fixtures/schemas/schema_with_custom_ajv_regexp_format.json
ajv_custom_regexp_formats: |
lowercase_char=^[a-z]*$
lowercase_alphanumeric=^[a-z0-9]*$
files: |
__tests__/fixtures/json/custom_ajv_regexp_format/valid.json