Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .clasp.json.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"scriptId": "YOUR_SCRIPT_ID_HERE",
"rootDir": "."
}
35 changes: 35 additions & 0 deletions .claspignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Ignore everything by default so Apps Script receives only the manifest and src/.
**

# Required Apps Script manifest.
!appsscript.json

# Application source files.
!src/
!src/**

# Documentation files — intentionally ignored; do not deploy to Apps Script
README.md
LICENSE

# CI and clasp template files.
.github/
.github/**
.clasp.json.example

# Future Node.js tooling and dependency files.
package.json
package-lock.json
npm-shrinkwrap.json
yarn.lock
pnpm-lock.yaml
pnpm-workspace.yaml
node_modules/
node_modules/**
.npmrc
.yarnrc
.yarnrc.yml
.pnpm-store/
.pnpm-store/**
.yarn/
.yarn/**
43 changes: 43 additions & 0 deletions .github/scripts/prepare-tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/usr/bin/env bash
set -euo pipefail

TEST_FILE="src/testFunctions.gs"
ENABLE_API_KEY_TESTS="${ENABLE_API_KEY_TESTS:-false}"
ENABLE_VERTEX_AI_TESTS="${ENABLE_VERTEX_AI_TESTS:-false}"
OPEN_AI_API_KEY="${OPEN_AI_API_KEY:-}"
GEMINI_API_KEY="${GEMINI_API_KEY:-}"
VERTEX_AI_PROJECT_ID="${VERTEX_AI_PROJECT_ID:-}"
VERTEX_AI_LOCATION="${VERTEX_AI_LOCATION:-global}"

if [ ! -f "$TEST_FILE" ]; then
echo "::error::${TEST_FILE} not found; cannot prepare remote Apps Script tests."
exit 1
fi

if [ "$ENABLE_API_KEY_TESTS" = "true" ]; then
missing=()
if [ -z "$OPEN_AI_API_KEY" ]; then
missing+=("OPEN_AI_API_KEY")
fi
if [ -z "$GEMINI_API_KEY" ]; then
missing+=("GEMINI_API_KEY")
fi

if [ "${#missing[@]}" -gt 0 ]; then
printf '::error::Cannot prepare API key tests because required environment variable(s) are missing: %s\n' "${missing[*]}"
exit 1
fi
else
echo "Skipping API key validation: API key tests are disabled."
fi

if [ "$ENABLE_VERTEX_AI_TESTS" = "true" ]; then
if [ -z "$VERTEX_AI_PROJECT_ID" ]; then
echo "::error::Cannot prepare Vertex AI tests because VERTEX_AI_PROJECT_ID is missing."
exit 1
fi
else
echo "Skipping Vertex AI configuration validation: Vertex AI tests are disabled."
fi

echo "Validated remote Apps Script test configuration without modifying ${TEST_FILE}."
Loading
Loading