Archived
Refactor repo for standalone portable provider workflow
This commit is contained in:
Executable
+14
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
echo "[check] Running gofmt"
|
||||
files="$(git ls-files '*.go')"
|
||||
if [[ -n "$files" ]]; then
|
||||
# shellcheck disable=SC2086
|
||||
gofmt -w $files
|
||||
fi
|
||||
|
||||
echo "[check] Running go test"
|
||||
go test ./...
|
||||
|
||||
echo "[check] Completed"
|
||||
Executable
+20
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
echo "[setup-dev] Validating local toolchain"
|
||||
|
||||
for cmd in bash git go; do
|
||||
if ! command -v "$cmd" >/dev/null 2>&1; then
|
||||
echo "[setup-dev][error] Missing required command: $cmd" >&2
|
||||
exit 1
|
||||
fi
|
||||
echo "[setup-dev] $cmd: $(command -v "$cmd")"
|
||||
done
|
||||
|
||||
if command -v terraform >/dev/null 2>&1; then
|
||||
echo "[setup-dev] terraform: $(command -v terraform)"
|
||||
else
|
||||
echo "[setup-dev][warn] terraform not found (only required for terraform validate and acceptance workflows)"
|
||||
fi
|
||||
|
||||
echo "[setup-dev] Toolchain validation complete"
|
||||
Executable
+19
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
if [[ "${TF_ACC:-}" != "1" ]]; then
|
||||
echo "[testacc][error] TF_ACC must be set to 1" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -z "${DYNU_API_KEY:-}" ]]; then
|
||||
echo "[testacc][error] DYNU_API_KEY must be set" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -z "${DYNU_DOMAIN:-}" ]]; then
|
||||
echo "[testacc][info] DYNU_DOMAIN is not set; running baseline acceptance scaffolding"
|
||||
fi
|
||||
|
||||
echo "[testacc] Running acceptance tests"
|
||||
go test ./internal/provider -run TestAcc -count=1
|
||||
Reference in New Issue
Block a user