From c503fca8942ff4c2d3aa1c345834bbee92a90e91 Mon Sep 17 00:00:00 2001 From: Johan Brandhorst-Satzkorn Date: Tue, 2 May 2023 17:28:31 -0700 Subject: [PATCH] .github: fix test matrix script The test matrix script was excluding directories that only contained external package tests (i.e. tests packages with _test suffix). The following tests were not being run: ./internal/daemon/controller/common/scopeids ./internal/daemon/controller/handlers/authtokens ./internal/daemon/controller/handlers/groups ./internal/daemon/controller/handlers/host_catalogs ./internal/daemon/controller/handlers/host_sets ./internal/daemon/controller/handlers/hosts ./internal/daemon/controller/handlers/roles ./internal/daemon/controller/handlers/scopes ./internal/daemon/controller/handlers/sessions ./internal/daemon/controller/handlers/targets/tcp ./internal/daemon/controller/handlers/users ./internal/db/schema/internal/edition ./internal/db/schema/internal/provider ./internal/db/schema/migrations/oss ./internal/scheduler/cleaner ./internal/tests/api/accounts ./internal/tests/api/authmethods ./internal/tests/api/authtokens ./internal/tests/api/credentiallibraries ./internal/tests/api/credentials ./internal/tests/api/credentialstores ./internal/tests/api/groups ./internal/tests/api/hostcatalogs ./internal/tests/api/hosts ./internal/tests/api/hostsets ./internal/tests/api/managedgroups ./internal/tests/api/roles ./internal/tests/api/scopes ./internal/tests/api/sessions ./internal/tests/api/targets ./internal/tests/api/users ./internal/tests/api/workers ./internal/util ./testing/dbtest ./testing/internal/e2e/tests/aws ./testing/internal/e2e/tests/database ./testing/internal/e2e/tests/static ./testing/internal/e2e/tests/static_with_vault --- .github/scripts/set-test-package-matrix.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/scripts/set-test-package-matrix.sh b/.github/scripts/set-test-package-matrix.sh index ce98487537..8bccd2b711 100755 --- a/.github/scripts/set-test-package-matrix.sh +++ b/.github/scripts/set-test-package-matrix.sh @@ -2,6 +2,6 @@ set -euo pipefail # set matrix var to list of unique packages containing tests -matrix="$(go list -json="ImportPath,TestGoFiles" ./... | jq --compact-output '. | select(.TestGoFiles != null) | .ImportPath' | jq --slurp --compact-output '.')" +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}" \ No newline at end of file +echo "matrix=${matrix}" | tee -a "${GITHUB_OUTPUT}"