Skip to content

Commit 1334b19

Browse files
committed
add a new acceptance test showing how regex + yaml works
1 parent 0f7b97d commit 1334b19

File tree

3 files changed

+35
-0
lines changed

3 files changed

+35
-0
lines changed

.github/workflows/acceptance-test.yml

+9
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,12 @@ jobs:
6666
yaml_schema: ./__tests__/fixtures/schemas/flat.yaml
6767
files: |
6868
__tests__/acceptance/flat_yaml/flat.yaml
69+
70+
- name: acceptance test - regex yaml
71+
uses: ./
72+
id: json-yaml-validate-regex-yaml-test
73+
with:
74+
comment: "true"
75+
yaml_schema: ./__tests__/fixtures/schemas/regex.yaml
76+
files: |
77+
__tests__/acceptance/flat_yaml/regex.yaml

__tests__/acceptance/regex/regex.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
name: my-awesome-app
2+
id: 21F640FA-CFBC-4848-9E60-813154A6F241
3+
tags:
4+
environment: production
5+
owner: engineering

__tests__/fixtures/schemas/regex.yaml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
type: object
2+
properties:
3+
name:
4+
type: string
5+
id:
6+
type: string
7+
pattern: "^[0-9a-fA-F-]{36}$"
8+
tags:
9+
type: object
10+
properties:
11+
environment:
12+
type: string
13+
required:
14+
- environment
15+
owner:
16+
type: string
17+
required:
18+
- name
19+
- id
20+
- tags
21+
- owner

0 commit comments

Comments
 (0)