Skip to content

Commit 353e053

Browse files
committed
feat: graphql-linter
1 parent 843539e commit 353e053

3 files changed

Lines changed: 26 additions & 0 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ jobs:
139139
release-build-tags: "lambda.norpc",
140140
- testing-type: "component"
141141
- testing-type: "coverage"
142+
- testing-type: "graphql-linter"
142143
- testing-type: "integration"
143144
- testing-type: "lint", build-tags: "component"
144145
- testing-type: "lint", build-tags: "e2e"

action.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ runs:
9393
inputs.task-install == 'yes' ||
9494
inputs.testing-type == 'component' ||
9595
inputs.testing-type == 'coverage' ||
96+
inputs.testing-type == 'graphql-linter' ||
9697
inputs.testing-type == 'integration' ||
9798
inputs.testing-type == 'lint' ||
9899
inputs.testing-type == 'mocks-tidy' ||
@@ -106,6 +107,7 @@ runs:
106107
inputs.task-install == 'yes' ||
107108
inputs.testing-type == 'component' ||
108109
inputs.testing-type == 'coverage' ||
110+
inputs.testing-type == 'graphql-linter' ||
109111
inputs.testing-type == 'integration' ||
110112
inputs.testing-type == 'lint' ||
111113
inputs.testing-type == 'mcvs-texttidy' ||
@@ -221,6 +223,14 @@ runs:
221223
run: |
222224
task remote:golangci-lint --yes
223225
#
226+
# Run graphql-linter.
227+
#
228+
- name: graphql-linter
229+
if: inputs.testing-type == 'graphql-linter'
230+
shell: bash
231+
run: |
232+
task remote:graphql-linter --yes
233+
#
224234
# Run MCVS-texttidy.
225235
#
226236
- name: mcvs-texttidy

build/task.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ vars:
5454
GOVULNCHECK_BIN: "{{.GOBIN}}/govulncheck"
5555
GQLGENC_VERSION: v0.25.4
5656
GQLGENC_BIN: "{{.GOBIN}}/gqlgenc"
57+
GRAPHQL_LINTER_BIN: "{{.GOBIN}}/graphql-linter"
58+
GRAPHQL_LINTER_VERSION: v0.1.0-rc.13
5759
HELM_VERSION: v3.16.2
5860
MCVS_TEXTTIDY_BIN: "{{.GOBIN}}/mcvs-texttidy"
5961
MCVS_TEXTTIDY_VERSION: 0.1.0
@@ -306,6 +308,19 @@ tasks:
306308
if ! {{.GQLGENC_BIN}} version | grep -q {{.GQLGENC_VERSION}}; then
307309
go install github.com/Yamashou/gqlgenc@{{.GQLGENC_VERSION}}
308310
fi
311+
graphql-linter-install:
312+
cmds:
313+
- |
314+
if ! {{.GRAPHQL_LINTER_BIN}} --version | grep -q {{.GRAPHQL_LINTER_VERSION}}; then
315+
go install github.com/schubergphilis/graphql-linter/cmd/graphql-linter@{{.GRAPHQL_LINTER_VERSION}}
316+
fi
317+
silent: true
318+
graphql-linter:
319+
cmds:
320+
- task: graphql-linter-install
321+
- |
322+
{{.GRAPHQL_LINTER_BIN}}
323+
silent: true
309324
keep-local-task-up-to-date-with-version-defined-in-action:
310325
cmds:
311326
- task: yq-install

0 commit comments

Comments
 (0)