Fix gqlgen (#1105)

This commit is contained in:
Googol Lee
2024-11-02 17:05:29 +01:00
committed by GitHub
parent 84c642ca79
commit 7b69f247d3
39 changed files with 3589 additions and 3497 deletions

13
scripts/test_all.sh Executable file
View File

@@ -0,0 +1,13 @@
#!/bin/sh
set -eu
for test in $(dirname $0)/test_*
do
if [ "${test}" != "${test%%/scripts/test_all.sh}" ]
then
continue
fi
echo Running ${test}...
${test}
done

5
scripts/test_api_coverage.sh Executable file
View File

@@ -0,0 +1,5 @@
#!/bin/sh
set -eu
cd $(dirname $0)/../api
go test ./... -v -database -filesystem -p 1 -coverprofile=coverage.txt -covermode=atomic

View File

@@ -0,0 +1,11 @@
#!/bin/sh
set -eu
cd $(dirname $0)/../api
go generate ./...
if [ "$(git status -s 2>/dev/null | head -1)" != "" ]; then
echo '--- FAIL: The generated API code is out of sync with the recent changes. Please run `go generate ./...` under `./api` to regenerate it and commit it to this branch.'
exit 1
fi
echo '--- PASS: All generated code is in sync with the project.'