You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
boundary/.github/scripts/set-test-package-matrix.sh

8 lines
353 B

#!/usr/bin/env bash
set -euo pipefail
# set matrix var to list of unique packages containing tests
matrix="$(go list -json="ImportPath,TestGoFiles,XTestGoFiles" ./... | jq --compact-output '. | select(.TestGoFiles != null or .XTestGoFiles != null) | .ImportPath' | jq --slurp --compact-output '.')"
echo "matrix=${matrix}" | tee -a "${GITHUB_OUTPUT}"