8000 feat: add JSON schema test cases by Vampire · Pull Request #250 · typesafegithub/github-actions-typing · GitHub
[go: up one dir, main page]

Skip to content

feat: add JSON schema test cases #250

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/test/resources/bad-typings/empty_inputs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# yaml-language-server: $schema=../../../main/schema/github-actions-typing.schema.json
# See https://github.com/typesafegithub/github-actions-typing
inputs:
3 changes: 3 additions & 0 deletions src/test/resources/bad-typings/empty_outputs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# yaml-language-server: $schema=../../../main/schema/github-actions-typing.schema.json
# See https://github.com/typesafegithub/github-actions-typing
outputs:
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# yaml-language-server: $schema=../../../main/schema/github-actions-typing.schema.json
# See https://github.com/typesafegithub/github-actions-typing
inputs:
list-of-boolean:
type: list
separator: ','
list-item:
type: boolean
allowed-values:
- read
- write
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# yaml-language-server: $schema=../../../main/schema/github-actions-typing.schema.json
# See https://github.com/typesafegithub/github-actions-typing
inputs:
list-of-boolean:
type: list
separator: ','
list-item:
type: boolean
list-item:
type: integer
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# yaml-language-server: $schema=../../../main/schema/github-actions-typing.schema.json
# See https://github.com/typesafegithub/github-actions-typing
inputs:
list-of-boolean:
type: list
separator: ','
list-item:
type: boolean
name: AllowedValues
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# yaml-language-server: $schema=../../../main/schema/github-actions-typing.schema.json
# See https://github.com/typesafegithub/github-actions-typing
inputs:
list-of-boolean:
type: list
separator: ','
list-item:
type: boolean
named-values:
infinite: 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# yaml-language-server: $schema=../../../main/schema/github-actions-typing.schema.json
# See https://github.com/typesafegithub/github-actions-typ 179B ing
inputs:
list-of-boolean:
type: list
separator: ','
list-item:
type: boolean
separator: ','
8 F438 changes: 8 additions & 0 deletions src/test/resources/bad-typings/inputs_boolean_with_allowed_values.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# yaml-language-server: $schema=../../../main/schema/github-actions-typing.schema.json
# See https://github.com/typesafegithub/github-actions-typing
inputs:
verbose:
type: boolean
allowed-values:
- read
- write
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# yaml-language-server: $schema=../../../main/schema/github-actions-typing.schema.json
# See https://github.com/typesafegithub/github-actions-typing
inputs:
verbose:
type: boolean
list-item:
type: boolean
6 changes: 6 additions & 0 deletions src/test/resources/bad-typings/inputs_boolean_with_name.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# yaml-language-server: $schema=../../../main/schema/github-actions-typing.schema.json
# See https://github.com/typesafegithub/github-actions-typing
inputs:
verbose:
type: boolean
name: AllowedValues
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# yaml-language-server: $schema=../../../main/schema/github-actions-typing.schema.json
# See https://github.com/typesafegithub/github-actions-typing
inputs:
verbose:
type: boolean
named-values:
infinite: 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# yaml-language-server: $schema=../../../main/schema/github-actions-typing.schema.json
# See https://github.com/typesafegithub/github-actions-typing
inputs:
verbose:
type: boolean
separator: ','
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# yaml-language-server: $schema=../../../main/schema/github-actions-typing.schema.json
# See https://github.com/typesafegithub/github-actions-typing
inputs:
granted-scopes:
type: list
separator: ','
list-item:
type: enum
allowed-values:
- ''
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# yaml-language-server: $schema=../../../main/schema/github-actions-typing.schema.json
# See https://github.com/typesafegithub/github-actions-typing
inputs:
granted-scopes:
type: list
separator: ','
list-item:
type: enum
allowed-values: []
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# yaml-language-server: $schema=../../../main/schema/github-actions-typing.schema.json
# See https://github.com/typesafegithub/github-actions-typing
inputs:
granted-scopes:
type: list
separator: ','
list-item:
type: enum
name: ''
allowed-values:
- read
- write
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# yaml-language-server: $schema=../../../main/schema/github-actions-typing.schema.json
# See https://github.com/typesafegithub/github-actions-typing
inputs:
granted-scopes:
type: list
separator: ','
list-item:
type: enum
allowed-values:
- read
- write
list-item:
type: integer
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# yaml-language-server: $schema=../../../main/schema/github-actions-typing.schema.json
# See https://github.com/typesafegithub/github-actions-typing
inputs:
granted-scopes:
type: list
separator: ','
list-item:
type: enum
allowed-values:
- read
- write
named-values:
infinite: 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# yaml-language-server: $schema=../../../main/schema/github-actions-typing.schema.json
# See https://github.com/typesafegithub/github-actions-typing
inputs:
granted-scopes:
type: list
separator: ','
list-item:
type: enum
allowed-values:
- read
- write
separator: ','
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# yaml-language-server: $schema=../../../main/schema/github-actions-typing.schema.json
# See https://github.com/typesafegithub/github-actions-typing
inputs:
granted-scopes:
type: list
separator: ','
list-item:
type: enum
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# yaml-language-server: $schema=../../../main/schema/github-actions-typing.schema.json
# See https://github.com/typesafegithub/github-actions-typing
inputs:
permissions:
type: enum
allowed-values:
- ''
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# yaml-language-server: $schema=../../../main/schema/github-actions-typing.schema.json
# See https://github.com/typesafegithub/github-actions-typing
inputs:
permissions:
type: enum
allowed-values: []
10 changes: 10 additions & 0 deletions src/test/resources/bad-typings/inputs_enum_with_empty_name.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# yaml-language-server: $schema=../../../main/schema/github-actions-typing.schema.json
# See https://github.com/typesafegithub/github-actions-typing
inputs:
permissions:
type: enum
name: ''
allowed-values:
- user
- admin
- guest
11 changes: 11 additions & 0 deletions src/test/resources/bad-typings/inputs_enum_with_list_item.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# yaml-language-server: $schema=../../../main/schema/github-actions-typing.schema.json
# See https://github.com/typesafegithub/github-actions-typing
inputs:
permissions:
type: enum
allowed-values:
- user
- admin
- guest
list-item:
type: boolean
11 changes: 11 additions & 0 deletions src/test/resources/bad-typings/inputs_enum_with_named_values.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# yaml-language-server: $schema=../../../main/schema/github-actions-typing.schema.json
# See https://github.com/typesafegithub/github-actions-typing
inputs:
permissions:
type: enum
allowed-values:
- user
- admin
- guest
named-values:
infinite: 0
10 changes: 10 additions & 0 deletions src/test/resources/bad-typings/inputs_enum_with_separator.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# yaml-language-server: $schema=../../../main/schema/github-actions-typing.schema.json
# See https://github.com/typesafegithub/github-actions-typing
inputs:
permissions:
type: enum
allowed-values:
- user
- admin
- guest
separator: ','
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# yaml-language-server: $schema=../../../main/schema/github-actions-typing.schema.json
# See https://github.com/typesafegithub/github-actions-typing
inputs:
permissions:
type: enum
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# yaml-language-server: $schema=../../../main/schema/github-actions-typing.schema.json
# See https://github.com/typesafegithub/github-actions-typing
inputs:
list-of-float:
type: list
separator: ','
list-item:
type: float
allowed-values:
- user
- admin
- guest
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# yaml-language-server: $schema=../../../main/schema/github-actions-typing.schema.json
# See https://github.com/typesafegithub/github-actions-typing
inputs:
list-of-float:
type: list
separator: ','
list-item:
type: float
list-item:
type: boolean
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# yaml-language-server: $schema=../../../main/schema/github-actions-typing.schema.json
# See https://github.com/typesafegithub/github-actions-typing
inputs:
list-of-float:
type: list
separator: ','
list-item:
type: float
name: AllowedValues
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# yaml-language-server: $schema=../../../main/schema/github-actions-typing.schema.json
# See https://github.com/typesafegithub/github-actions-typing
inputs:
list-of-float:
type: list
separator: ','
list-item:
type: float
named-values:
infinite: 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# yaml-language-server: $schema=../../../main/schema/github-actions-typing.schema.json
# See https://github.com/typesafegithub/github-actions-typing
inputs:
list-of-float:
type: list
separator: ','
list-item:
type: float
separator: ','
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# yaml-language-server: $schema=../../../main/schema/github-actions-typing.schema.json
# See https://github.com/typesafegithub/github-actions-typing
inputs:
some-float:
type: float
allowed-values:
- user
- admin
- guest
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# yaml-language-server: $schema=../../../main/schema/github-actions-typing.schema.json
# See https://github.com/typesafegithub/github-actions-typing
inputs:
some-float:
type: float
list-item:
type: boolean
6 changes: 6 additions & 0 deletions src/test/resources/bad-typings/inputs_float_with_name.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# yaml-language-server: $schema=../../../main/schema/github-actions-typing.schema.json
# See https://github.com/typesafegithub/github-actions-typing
inputs:
some-float:
type: float
name: AllowedValues
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# yaml-language-server: $schema=../../. 10000 ./main/schema/github-actions-typing.schema.json
# See https://github.com/typesafegithub/github-actions-typing
inputs:
some-float:
type: float
named-values:
infinite: 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# yaml-language-server: $schema=../../../main/schema/github-actions-typing.schema.json
# See https://github.com/typesafegithub/github-actions-typing
inputs:
some-float:
type: float
separator: ','
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# yaml-language-server: $schema=../../../main/schema/github-actions-typing.schema.json
# See https://github.com/typesafegithub/github-actions-typing
inputs:
list-of-integer:
type: list
separator: ','
list-item:
type: integer
allowed-values:
- read
- write
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# yaml-language-server: $schema=../../../main/schema/github-actions-typing.schema.json
# See https://github.com/typesafegithub/github-actions-typing
inputs:
list-of-integer:
type: list
separator: ','
list-item:
type: integer
name: ''
named-values:
foo: 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# yaml-language-server: $schema=../../../main/schema/github-actions-typing.schema.json
# See https://github.com/typesafegithub/github-actions-typing
inputs:
list-of-integer:
type: list
separator: ','
list-item:
type: integer
name: AllowedValues
named-values:
'': 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# yaml-language-server: $schema=../../../main/schema/github-actions-typing.schema.json
# See https://github.com/typesafegithub/github-actions-typing
inputs:
list-of-integer:
type: list
separator: ','
list-item:
type: integer
name: AllowedValues
named-values: {}
Loading
Loading
0