github.com/daeuniverse/quic-go@v0.0.0-20240413031024-943f218e0810/.github/workflows/no_ginkgo.sh (about)

     1  #!/usr/bin/env bash
     2  
     3  # Verify that no non-test files import Ginkgo or Gomega.
     4  
     5  set -e
     6  
     7  HAS_TESTING=false
     8  
     9  cd ..
    10  for f in $(find . -name "*.go" ! -name "*_test.go" ! -name "tools.go"); do
    11  	if grep -q "github.com/onsi/ginkgo" $f; then
    12      echo "$f imports github.com/onsi/ginkgo/v2"
    13      HAS_TESTING=true
    14  	fi
    15  	if grep -q "github.com/onsi/gomega" $f; then
    16      echo "$f imports github.com/onsi/gomega"
    17      HAS_TESTING=true
    18  	fi
    19  done
    20  
    21  if "$HAS_TESTING"; then
    22  	exit 1
    23  fi
    24  exit 0