github.com/99designs/gqlgen@v0.17.45/.github/workflows/check-integration (about)

     1  #!/bin/bash
     2  
     3  set -euo pipefail
     4  export GO111MODULE=on
     5  cd integration
     6  
     7  date
     8  go run ./server/cmd/integration/server.go &
     9  
    10  sleep 5
    11  curl -s --connect-timeout 5 \
    12      --max-time 10 \
    13      --retry 5 \
    14      --retry-delay 5 \
    15      --retry-max-time 40 \
    16      --retry-connrefused \
    17      localhost:8080 > /dev/null
    18  
    19  
    20  echo "### validating introspected schema"
    21  npm run gen
    22  
    23  if ! diff <(tail -n +3 src/generated/schema-expected.graphql) <(tail -n +3 src/generated/schema-fetched.graphql) ; then
    24      echo "The expected schema has changed, you need to update schema-expected.graphql with any expected changes"
    25      exit 1
    26  fi
    27  
    28  echo "### running integration spec"
    29  npm run test