Skip to content

Commit

Permalink
Add additional checks for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
vigneshwerv committed May 23, 2024
1 parent 4edf64b commit e1d41a8
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,21 @@ jobs:
- name: Run tests
run: |
go test -cover -v ./...
- name: Validate GraphQL queries
run: |
export EXITCODE=$(grep -E '^(mutation|query) [a-z]' queries/queries.graphql || echo $?)
if [[ $EXITCODE -eq 0 ]]; then
echo "Failed to validate queries."
echo "Ensure that queries are in title-case."
exit 1
fi
- name: Verify generated queries are up-to-date
run: |
go run main.go \
--input=queries/queries.graphql \
--output=queries/queries.go \
--package=queries
git diff --exit-code
exit $?

0 comments on commit e1d41a8

Please sign in to comment.